I seem to crap out in a (Cygwin) c program at getting 2gb of memory, at which point malloc()
returns 0, meaning no more available. At the same time, the task monitor shows page file history
going up to 4gb.
SO far I don't understand what's happening.
Possibilities (1) XP Home is limiting the user proc to 2gb
(2) somehow the allocated memory has to be duplicated somewhere having something to do with
the page file, and that's hitting a limit at 4gb, though I don't see why this doubling is
necessary
(3) Cygwin is putting the stack pointer in the middle of the address space, so that only 2GB is
available through malloc() and the rest is accessible only to the stack.
I may experiment more but maybe somebody knows already.
As far as I'm aware, all 32-bit desktop versions of Windows have a 2GB
per process memory limit. It seems that this is true at least up to
Windows Server 2003 in its 32-bit editions.
On Aug 15, 7:26 am, Ron Hardin <rhhar...@mindspring.com> wrote:
> I seem to crap out in a (Cygwin) c program at getting 2gb of memory, at which point malloc()
> returns 0, meaning no more available. At the same time, the task monitor shows page file history
> going up to 4gb.
>
> SO far I don't understand what's happening.
>
> Possibilities (1) XP Home is limiting the user proc to 2gb
> (2) somehow the allocated memory has to be duplicated somewhere having something to do with
> the page file, and that's hitting a limit at 4gb, though I don't see why this doubling is
> necessary
> (3) Cygwin is putting the stack pointer in the middle of the address space, so that only 2GB is
> available through malloc() and the rest is accessible only to the stack.
>
> I may experiment more but maybe somebody knows already.
>
> The system itself reports 3.75GB of ram.
> --
> rhhar...@mindspring.com
>
> On the internet, nobody knows you're a jerk.
You might want to ask on comp.lang.c, or a c programming forum about
overcoming that limit.