Posted on 2007-10-03
I'm running into a problem allocating memory on winXP. Memory is being allocated in some threads, which looks like:
On my test case, I have 4 threads open which all execute that same function - 902mb are being used in the system at this point - before this point, the memory usage rose to as high as 1.5 gb. Which ever thread of the 4 waiting I choose to let continue first always fails Allocate() with a general memory allocation error (bad alloc). Since the thread dies, it releases its other memory and the other three threads all get through it ok.
I'm guessing this is a fragmentation problem? Is there anyway to compact the heap? Is this an OS specific thing? Is there anyway to specifically check that this is a fragmentation problem?