PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Memory issues with WM2003

HI!

After made some allocations, WM2003 fails making a big allocation with enough free memory while WM2005 seems to works right even with less free memory. How would I solve this issue under 2003? It sounds to be a memory fragmentation issue :? I'm as confused as the emoticon :?

Regards
You can use memory mapped files to allocate memory on demand.
I've found that malloc() fails above about 12mb.

Use VirtualAlloc() to get around it:


Code:

void* ptrVirt = VirtualAlloc(NULL, size, MEM_RESERVE, PAGE_NOACCESS);
void* pMem = VirtualAlloc(ptrVirt, size, MEM_COMMIT, PAGE_READWRITE);