From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199702241729.LAA18689@atheist.tamu.edu> Date: Mon, 24 Feb 1997 11:29:40 -0600 (CST) From: Richard Henderson Subject: Re: A problem porting sbrk In-Reply-To: <199702232301.PAA30446@hedrock.ps.uci.edu> > However, it seems to me that this doesn't address the main > problem. Regardless of the way the "out of memory" error is reported, > the OSF program isn't able to get as much memory as the same > program compiled with gcc on the linux machine itself. I don't see this effect. To be sure, I modified your program a little to make sure memory was actually being allocated, rather than getting a few hundred thousand copy-on-write duplicates of the zero page. I append it. In any case, on a machine with 64MB ram and no swap, I get 5227 pages allocated by a native linux application, and 5100 pages allocated by a static OSF application -- roughly 40.8MB and 39.8MB respectively. Some but not all of that can be explained by the larger static binary, but in any case would not seem to indicate the problem you describe. Disregarding ulimits, there should be no arbitrary limit to how much memory an application can grab, native or otherwise. Can anyone else duplicate this problem? I recommend trying this without to terribly much swap, as it can take forever to page through even a 64M partition. r~ #include extern void * sbrk(long inc); int main() { int i = 0; long *pa; while(1) { pa = sbrk(8*1024); printf("%p %d\n",pa,++i); printf("%ld\n",*pa = 1); } } -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com