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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ab4f67f984ef04f9 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!cyclone1.gnilink.net!gnilink.net!peer01.cox.net!cox.net!atl-c02.usenetserver.com!news.usenetserver.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 21 May 2004 11:00:48 -0500 Date: Fri, 21 May 2004 12:00:47 -0400 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is the Ada run-time required to detect out-of-memory conditions? References: <878yfmiuak.fsf@insalien.org> <5ad0dd8a.0405210313.70f9339d@posting.google.com> <1486434.Nr7pvG7a0e@linux1.krischik.com> In-Reply-To: <1486434.Nr7pvG7a0e@linux1.krischik.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <3YmdnQbGo7stujPd4p2dnA@comcast.com> NNTP-Posting-Host: 24.147.90.114 X-Trace: sv3-yZOEIsyxxkdEVVxMIin8ZOKi3CmGFZ9ZGjHwC2wZklKPyi8e4SyHMlnJvCQwrApIJxV8VadL7BWuI7z!J2LXGoF4Q+FMUA6l+sIF0yh+/2cyU/jHbvlOEhtksKuYe22Folyj6yuKvKa4Hw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: controlnews3.google.com comp.lang.ada:747 Date: 2004-05-21T12:00:47-04:00 List-Id: Martin Krischik wrote: > Just a thought: The page size on Intel CPU's is 4 kb. So most OS's on Intel > CPU will only handle memory requests of at least one page. > > I find it interesting that with request significantly larger then one page > everything seems Ok. > > Lets Think: With GNAT allocation from the standart storrage pool are just > passed down to C's malloc (). > > When smaller memory is requested most C compiler will bundele several > requests into one page request. > > When larger memory is requested some C compiler will just pass the request > on to the OS and some other will allways bundle. This is interesting. It sounds like almost the opposite of what I expected. Apparently if the memory requests are large enough that some pages are left virtual, you get the Storage_Error. But if the code results in every page allocated being 'touched' you get killed. But this discovery definitely indicates it is some code in malloc that is skipping a necessary check, and that the error is not in the GNAT runtime. -- Robert I. Eachus "The terrorists rejoice in the killing of the innocent, and have promised similar violence against Americans, against all free peoples, and against any Muslims who reject their ideology of murder. Their barbarism cannot be appeased, and their hatred cannot be satisfied. There's only one way to deal with terror: We must confront the enemy and stay on the offensive until these killers are defeated." -- George W. Bush