views:

75

answers:

1

A customer has some memory usage requirements of our application. They note that while our committed memory is reasonable, the reserved memory is high. They suspect this is because the CRT heap grows as we allocate memory, but the CRT isn't returning pages to the OS when the memory is deallocated. We are just using built-in operator new/delete/new[]/delete[] - along with a little usage of malloc/free.

They ask, "Does your memory manager call _heapmin at some point to compact the heap?"

ummm, we don't explicitly call _heapmin. Should we? Are there any rules of thumb for its use?

+1  A: 

As you are using the CRT memory manager there is no need to call it explicitly the OS will manage this.

Andy