开发者

When/why should heapmin be used?

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 CR开发者_高级运维T 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜