Software Archive
Read-only legacy content
17061 Discussions

Do .dlls have stacks?

Intel_C_Intel
Employee
607 Views
When I write .dll add-ins for commercially available programs (Matlab, in this case) and I get a stack overflow in the .dll; is it the app stack that is overflowing or does the .dll have its own stack?

matt.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
607 Views
Ah, what an opening. I cover exactly this topic in Issue X of the Visual Fortran Newsletter, being mailed out now to registered users.

No, DLLs don't have their own stacks. You are limited by the stack specified when the EXE was linked. The best approach is to reduce use of the stack by using allocatable arrays instead of automatic arrays, and trying to reduce the need for the compiler to make temporary array copies.

Steve
0 Kudos
Reply