From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,be7fa91648ac3f12 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!proxad.net!usenet-fr.net!grolier!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Large arrays (again), problem case for GNAT Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Thu, 14 Apr 2005 09:29:03 +0200 Message-ID: NNTP-Posting-Date: 14 Apr 2005 09:29:03 MEST NNTP-Posting-Host: 3afaa3ff.newsread4.arcor-online.net X-Trace: DXC=bndS]Lo63WkEFMTLjj\foo:ejgIfPPlddjW\KbG]kaMhFYk:AnJB[CmUFl`Z^=iC`o[6LHn;2LCVn7enW;^6ZC`d<=9bOTW=MNn X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:10449 Date: 2005-04-14T09:29:03+02:00 List-Id: On Thu, 14 Apr 2005 05:11:56 +0400 (MSD), Alexander E. Kopilovich wrote: > Robert A Duff wrote; > >> "(see below)" writes: >> >>> I see that Adrian is using Linux. >>> Is Linux not notorious for problems of this kind? >>> >>> I seem to remember that it has some kind of optimistic allocator >> that can grant a memory allocation request, only for it to fail >> when you try to use the memory you appear to have been granted. >> >>... >> >> I'm not sure why you say "notorious". It seems to me that >> allocate-on-write is desirable. > > So, what is the meaning of malloc call with this approach? In which court > (somewhere in Linux or outside) I should defend my right to use the memory, > which I legally requested by malloc, was granted, and then deprived of it? It is a well known and very old design flaw of many OSes including Linux, that successful allocation does not give you any amount of virtual memory until you commit the pages. It is not memory you are granted, it is even not virtual memory, it is address space which is worth of nothing. This controversy is as old as in-out parameters of Ada functions... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de