开发者

Stack/Heap differences between .NET EXEs and DLLs

开发者 https://www.devze.com 2023-02-27 01:48 出处:网络
I am puzzled by this problem for a long time: .NET EXE and DLL files both hav开发者_StackOverflow社区e address space. I know that they both have code space and global variable space. But I want to kn

I am puzzled by this problem for a long time:

.NET EXE and DLL files both hav开发者_StackOverflow社区e 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.


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:

  • Its a executable file.
  • When a system launches new exe, a new process is created

DLL

  • Its a Dynamic Link Library.

Check here for more : Differences between exe and dll

0

精彩评论

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

关注公众号