I have a program that creates memory mapped files (shared memory) and are not mapped to a file directly. When I try to allocate a bunch of memory mapped files, it works fine with 128MB and 256MB chunks but fails with 512MB and 1GB chunks. CreateFileMapping succeeds but MapViewofFile fails with GetLastError 8 (ERROR_NOT_ENOUGH_MEMORY). This is on a Windows 2003 server 32-bit edition SP1 with 4GB ram and the page file size is set to 'System managed'.
Any ideas as to why allocation of say, five 256MB memory mapped files works fine but allocation of one 1GB memory mapped file fails with ERROR_NOT_ENOUGH_MEMORY
Thanks in advance,
Shashi.