开发者

When/why should heapmin be used?

开发者 https://www.devze.com 2022-12-20 15:10 出处:网络
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开发者_高级运维

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

精彩评论

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

关注公众号