C++ memory limit ?

Discussion in 'C++' started by scavenger, Jan 11, 2007.

  1. scavenger

    scavenger Guest

    I am unable to allocate more than 2.4G of memory for a C++ program
    though I have aprox. 4G of physical memory. I am using g++ on a RH9
    box.

    thanks,
    scavenger, Jan 11, 2007
    #1
    1. Advertising

  2. scavenger

    Simon G Best Guest

    scavenger wrote:
    > I am unable to allocate more than 2.4G of memory for a C++ program
    > though I have aprox. 4G of physical memory. I am using g++ on a RH9
    > box.
    >
    > thanks,


    You're welcome.

    --
    Simon G Best
    What happens if I mention Leader Kibo in my .signature?
    Simon G Best, Jan 11, 2007
    #2
    1. Advertising

  3. scavenger

    Larry Smith Guest

    Simon G Best wrote:
    > scavenger wrote:
    >> I am unable to allocate more than 2.4G of memory for a C++ program
    >> though I have aprox. 4G of physical memory. I am using g++ on a RH9
    >> box.
    >>
    >> thanks,

    >
    > You're welcome.
    >


    Ask in a Linux newsgroup.

    Memory allocation details are Operating System specific.

    Most Unix/Linux systems have a per-process memory allocation
    limit to prevent a single program from using all of the
    resources (thereby starving other running programs).
    Larry Smith, Jan 11, 2007
    #3
  4. scavenger

    Guest

    On Jan 11, 4:03 am, "scavenger" <> wrote:
    > I am unable to allocate more than 2.4G of memory for a C++ program
    > though I have aprox. 4G of physical memory. I am using g++ on a RH9
    > box.
    >
    > thanks,
    , Jan 11, 2007
    #4
  5. On Jan 11, 2:03 am, "scavenger" <> wrote:
    > I am unable to allocate more than 2.4G of memory for a C++ program
    > though I have aprox. 4G of physical memory. I am using g++ on a RH9
    > box.


    As others have pointed out, this is platform-dependent but 2.9 seems
    about right. Most Linuxes split the address-space into 1GB for kernel
    and 3GB for the app, Windows usually split it 2/2GB. Notice that those
    3GB is the total amount available to the app not how much you can
    allocate, some of it goes to storing the actual application and such.

    --
    Erik Wikström
    =?iso-8859-1?q?Erik_Wikstr=F6m?=, Jan 11, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tomas
    Replies:
    0
    Views:
    2,802
    Tomas
    Jan 21, 2004
  2. Mike Sharp
    Replies:
    1
    Views:
    3,762
    Robbe Morris [C# MVP]
    Apr 22, 2005
  3. =?Utf-8?B?Sm9obiBSLg==?=

    Win 64 IIS memory limit

    =?Utf-8?B?Sm9obiBSLg==?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,412
    Jim Cheshire
    Jan 21, 2006
  4. Segah

    Tomcat context memory limit

    Segah, Oct 6, 2003, in forum: Java
    Replies:
    1
    Views:
    753
    Hugo Pragt
    Oct 6, 2003
  5. Replies:
    1
    Views:
    1,067
    Victor Bazarov
    Jun 28, 2005
Loading...

Share This Page