I'm working on a 32bit Ubuntu 12.04. The RAM is 7.7 GB. When I run a certain process (written in C++) and reaches 50% of RAM usage, such process throws a "std::bad_alloc". The strange thing is that heap size is unlimited (command ulimit -v returns "unlimted"). So which can be the cause?
Asked
Active
Viewed 773 times
2 Answers
5
On most 32-bit platforms, it's impossible for a process to address more than 4GB (2^32 bytes) of virtual memory. On 32-bit Linux, 1GB of the address space is reserved for the kernel, so user processes are limited to 3GB of addressable memory.

Mike Seymour
- 249,747
- 28
- 448
- 644
3
On a 32-bit machine, even with PAE, a single process address space cannot be larger then 4GB.

Nikolai Fetissov
- 82,306
- 11
- 110
- 171