Re: hi you had run my code ?
From: Randy Howard (randyhoward_at_FOOverizonBAR.net)
Date: 03/23/05
- Next message: BQ: "Re: Translation from recursive to iterative"
- Previous message: pete: "Re: compiling error"
- In reply to: Walter Roberson: "Re: hi you had run my code ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 23 Mar 2005 08:03:06 GMT
In article <d1qq5o$gee$1@canopus.cc.umanitoba.ca>, roberson@ibd.nrc-
cnrc.gc.ca says...
> In article <d1qmag$r72$1@news.yaako.com>, <chong19782002@hotmail.com> wrote:
> :I _think_ Linux gives you 3G, but I could be wrong.
>
> Something I read awhile ago suggested that it depended on the kernel
> version and how you compiled.
OT: This can be done under Windows also, provided you have less than
4GB of RAM total and do not have /PAE turned on. Google for boot.ini
options.
> After some cleanup and optimization, yes. Compiled as a 32 bit
> executable, it runs on one machine until it pretty much reaches the
> end of the storage space "underneath" the virtual address that libc
> gets placed at.
I think that you will discover that for a system running 32-bit
Windows or Linux with 2GB of RAM or more installed, and using default
kernel options (I.e. no 3GB address space hack), that a reasonably
sized command line app will be able to malloc around 1600-1700MB of
RAM prior to it failing. People that claim that malloc() never fails
should try this for themselves.
> Compiled as a 64 bit executable and run on a different machine, it
> run to completion -- the object layout is different for the 64 bit
> executables.
Malloc will also fail (eventually) on Linux/glibc 64-bit
combinations. The point it fails varies. I tried this a while back
on an x86_64 w/64GB (not a typo) of RAM. I forgot where it failed
in a single process (16GB?), but recall that with pthreads (NPTL),
it would fail at just under 8GB/thread, but you could effectively
chew up the entire 64GB by starting 8 threads and having each ask
for 8GB.
I haven't tried this on a Win64 x86_64 system (yet).
-- Randy Howard (2reply remove FOOBAR) "Making it hard to do stupid things often makes it hard to do smart ones too." -- Andrew Koenig
- Next message: BQ: "Re: Translation from recursive to iterative"
- Previous message: pete: "Re: compiling error"
- In reply to: Walter Roberson: "Re: hi you had run my code ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|