From owner-freebsd-fortran@FreeBSD.ORG Fri Aug 23 10:26:10 2013 Return-Path: Delivered-To: fortran@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 48261B31 for ; Fri, 23 Aug 2013 10:26:10 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from eu1sys200aog117.obsmtp.com (eu1sys200aog117.obsmtp.com [207.126.144.143]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 99EFE2C0B for ; Fri, 23 Aug 2013 10:26:09 +0000 (UTC) Received: from mail-wi0-f182.google.com ([209.85.212.182]) (using TLSv1) by eu1sys200aob117.postini.com ([207.126.147.11]) with SMTP ID DSNKUhc4urqPluDh9ZmvtYKJ9NEOzgV3ROH1@postini.com; Fri, 23 Aug 2013 10:26:09 UTC Received: by mail-wi0-f182.google.com with SMTP id hi8so379398wib.3 for ; Fri, 23 Aug 2013 03:26:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:date:from:message-id:to:subject:reply-to; bh=807c8F9tjgunPOkR/3J0MEdQzNQdIuUtgVoEBg2w3Bg=; b=D8d6IG7Jy+k6PGSO1GU9qkX0oun67NC0byadOjo5DsllpoM++jYsvcTuw7W/bNZAE2 pxOockHBg0wWEhzyJFmO76BJSVuDD8rZhCyNo7S/Vdzr1/jc1uGQjmPJ6D1YXlet9uab cXQqewdbxKCHAjujYZe2yh1ZX7g1iEKEg7UJN9uvbDOBnxfvkWaW72o0f24qYGNAKWHZ E7kov54YQolOKttgBqHSFJkHdQHoOxF8gZ1PO4quub1xrndJpohvVQlTVFvoFth8bNvz nsy+ctP5uQnz/dqH+NFRHss6U5XFwyCAYVjLezWW5QYYhMdo7DXsSOudm0o4lNxSf/eB OTUg== X-Gm-Message-State: ALoCoQmgJFKhSJe+3P8SJYmmfdjUt3g+J10waT0ZOAEVRVn9qe3twjWdILIu4r6J7F7iFF7F7Ma09EQv1AmFUvrf6vTDQdpzxx2cTHENWVp5Ef1szH2rb5Wx3WvxIZlTLXN2B7aaUHi8tXg9EzZvJH7aeiHknICbnQ== X-Received: by 10.180.75.16 with SMTP id y16mr1593812wiv.59.1377253561996; Fri, 23 Aug 2013 03:26:01 -0700 (PDT) X-Received: by 10.180.75.16 with SMTP id y16mr1593810wiv.59.1377253561934; Fri, 23 Aug 2013 03:26:01 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id z2sm2774762wiv.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 03:26:01 -0700 (PDT) Sender: Anton Shterenlikht Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6) with ESMTP id r7NAPwh3043267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 23 Aug 2013 11:25:58 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6/Submit) id r7NAPwNH043266 for fortran@freebsd.org; Fri, 23 Aug 2013 11:25:58 +0100 (BST) (envelope-from mexas) Date: Fri, 23 Aug 2013 11:25:58 +0100 (BST) From: Anton Shterenlikht Message-Id: <201308231025.r7NAPwNH043266@mech-cluster241.men.bris.ac.uk> To: fortran@freebsd.org Subject: lazy memory allocation X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bris.ac.uk List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 10:26:10 -0000 I've been burned by what's apparently called "lazy memory allocation" on linux. My code calls a subroutine that allocates a coarray. This routine exits fine, with no error. However, when I tried to initialise the coarray, I got segfault. On investigation I discovered that the coarray was not in fact allocated. In my particular case this was because there was not enough memory. Anyway, I was later told that this is an expected behaviour on linux, with its "lazy memory allocation". I'm wondering if FreeBSD also uses a lazy memory allocation, or we do it differently? Anton