.NET EXE 和 DLL 之间的堆栈/堆差异
我被这个问题困惑了很长时间:
.NET EXE和DLL文件都有地址空间。我知道它们都有代码空间和全局变量空间。但我想知道DLL是否有自己的堆和栈空间。
I am puzzled by this problem for a long time:
.NET EXE and DLL files both have address space. I know that they both have code space and global variable space. But I want to know whether DLLs have their own heap and stack space.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该进程拥有该堆。每个线程拥有自己的堆栈。当 EXE 调用 DLL 中的函数时,将使用相同的堆栈,因为函数调用是在同一线程内。
另一点需要说明的是,进程具有加载 EXE 和 DLL 的地址空间。
The process owns the heap. Each thread owns its own stack. When an EXE calls a function in a DLL the same stack is used because the function call is within the same thread.
The other point to make is that the process has the address space into which the EXE and DLL are loaded.
AFAIK,
EXE:
DLL
请在此处查看更多信息:exe 和 dll 之间的差异
AFAIK,
EXE:
DLL
Check here for more : Differences between exe and dll