C++ memory limit ?

S

scavenger

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,
 
S

Simon G Best

scavenger said:
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.
 
L

Larry Smith

Simon said:
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).
 
?

=?iso-8859-1?q?Erik_Wikstr=F6m?=

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top