Re: hi you had run my code ?

From: Randy Howard (randyhoward_at_FOOverizonBAR.net)
Date: 03/23/05


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


Relevant Pages

  • RE: Media Player Hangs with Hyper-Threading On
    ... We are seeing the same exact thing. ... I have also posted this question in the "Windows Media\Windows ... > run all HT processors now and when we turn HT off, the system never fails. ... > 512 MB RAM ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Media Player Hangs with Hyper-Threading On
    ... I have also posted this question in the "Windows Media\Windows ... > Media Player" newsgroup in hopes that they may be able to help. ... > run all HT processors now and when we turn HT off, the system never fails. ... > 512 MB RAM ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Re: help! multi-threading problem on hyperthreading smp linux server
    ... 2.2.2, on all machines but the windows one, which runs 2.3. ... linux smp kernel. ... it's looking like this may be the problem, since the machine it fails on ...
    (comp.lang.python)
  • Re: whaich Hardware to speed up WOW
    ... 4 GB of Ram won't do you any good unless you will run linux or Windows ... > XP64 on it. ... > address rooms, one for user, one for kernel. ...
    (alt.games.warcraft)
  • Re: New to Linux
    ... A good, and comprehensive, overview of available Linux distributions ... Any distro includes the Linux kernel. ... For Windows 98, 32 MB of RAM would be _very_ tight, IMO; ...
    (comp.os.linux.questions)