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 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!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: Is the Ada run-time required to detect out-of-memory conditions? Date: 21 May 2004 16:41:21 -0700 Organization: http://groups.google.com Message-ID: <5ad0dd8a.0405211541.63e08fff@posting.google.com> References: <878yfmiuak.fsf@insalien.org> <5ad0dd8a.0405210313.70f9339d@posting.google.com> <1486434.Nr7pvG7a0e@linux1.krischik.com> <3YmdnQbGo7stujPd4p2dnA@comcast.com> <87vfipputb.fsf@insalien.org> NNTP-Posting-Host: 83.27.32.209 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1085182881 2503 127.0.0.1 (21 May 2004 23:41:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 21 May 2004 23:41:21 +0000 (UTC) Xref: controlnews3.google.com comp.lang.ada:763 Date: 2004-05-21T16:41:21-07:00 List-Id: Hello, > Now, 2940 MiB / 192_650_250 iterations averages 16 bytes per > allocation. Each Integer is theoretically only 4 bytes. So, while > libgnat does indeed reuse previously allocated pages, there is a > non-negligible overhead. Part of this may be due to the necessary > bookkeeping structures in the C library (malloc), but do you think > this might explain such a huge (4x) overhead? Here is a description of how it works: http://gee.cs.oswego.edu/dl/html/malloc.html Indeed 16 bytes are supposed to be allocated, according to this document. When I actually write the allocated space, i get "Killed" for almost any size of chunk... And yes, I do have "May 22 01:17:00 slooby kernel: VM: killing process memory_chunk" messages in my syslog... I would be interested in finding out wether this is specific to Linux, and how about kernel 2.6. Regards, Wojtek