max heap usage allowed per process

c++, heap-memory, memory-management, visual-c++

Solution

The per-process memory limit is 2GB (unless you use the Windows /3GB switch). However, you are probably running into memory fragmentation. When the memory gets fragmented (visualize with VMMap), you will not be able to allocate a large contiguous block. Your options are:

- Allocate in smaller blocks (preferred)

- Find some way to defragment the memory

- Upgrade to a 64-bit OS (you can still compile 32-bit code, but you will have up to 4GB for user mode memory - remember to turn on the large memory aware compiler flag; if you compile 64-bit code, it won't run at all on a 32-bit OS, but the memory limit is much higher than 4GB)

- If you need that much memory for loading a file, you might be able to memory map the file

- You might be able to allocate the largest blocks earlier than the smaller blocks.

Problem

i m using malloc to allocate memory and memory requirements are greater than 1GB. so program is crashing... i want to ask whether this problem can be solved??If yes than how?? my RAM size is 3GB and using 32 bit windows os and programming using vc++

Original source