windows - 进程的默认堆

标签 windows memory-management process heap-memory

我读了这个article这是关于 Managing heap memory 的,由 Randy Kath 编写。 我会问这个部分:

Every process in Windows has one heap called the default heap. Processes can also have as many other dynamic heaps as they wish, simply by creating and destroying them on the fly. The system uses the default heap for all global and local memory management functions, and the C run-time library uses the default heap for supporting malloc functions.

我不明白默认堆的功能或好处是什么?

另外,我还有一个问题,作者一直提到reserved and committed spacecommitted space是什么意思?

最佳答案

应用程序需要堆来分配动态内存。 Windows 自动为每个进程创建一个堆。这是默认堆。大多数应用只使用这个单一的默认堆。

提交 是将保留 虚拟地址分配给特定内存的行为,以便它可供进程使用。我建议您阅读 MSDN 上的这篇文章:Managing Virtual Memory .

关于windows - 进程的默认堆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8280942/

相关文章:

ios - 堆内存的持久化分配 NSTimer

java - 我想释放一些 ram 空间来提高系统性能而不终止或杀死 java 进程

python - 如何在 Windows 上连接到 WiFi 网络?

mysql - LOAD DATA LOCAL INFILE 不适用于 IP 地址

c++ - Windows 在 WM_WINDOWPOSCHANGED 中挂起

memory-management - 程序是如何分段的?

windows - 如何将 "break"跳出 For 循环?

c++ - Pageheap 不会让我的应用程序中断

c# - 在 ProcessStartInfo 中运行 `mklink`

php - 如果内存过度使用,哪个进程会被内核杀死? child 还是 parent ?