kenny
kenny

Reputation: 229

Stack/Heap differences between .NET EXEs and DLLs

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.

Upvotes: 2

Views: 1012

Answers (2)

David Heffernan
David Heffernan

Reputation: 613511

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.

Upvotes: 6

Saurabh Gokhale
Saurabh Gokhale

Reputation: 46425

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

Upvotes: 2

Related Questions