Reply to bearophile,

While allocating lot of memory for a little memory-hungry program, I
have found results that I don't understand. So I have written the
following test programs. Maybe someone can give me some information on
the matter.

I am using a default install of a 32 bit Win XP with 2 GB RAM (so for
example I can't allocate 3 GB of RAM). (I presume answers to my
questions are Windows-related).

From C (MinGW 4.2.1) this is about the largest memory block I can
allocate (even it swaps and requires 7+ seconds to run), 1_920_000_000
bytes:



IIRC without special work, 32bit windows apps can't use more than 2GB of total address space regardless of how much ram you have. It's an OS imposed limit. With special setup that can be switched to 3GB but that is it.


Reply via email to