- Memory allocation between DLL and EXE
- Posted by Ronaldo Tomazeli Duarte on January 25th, 2005
Hello,
I'd like to know what is the safer way to allocate memory in a DLL and
use it in a EXE. What I'm currently doing is allocating in the DLL,
passing to the EXE and giving it back to the DLL through an exported
function, which deallocate it. This way, the allocation/deallocation
is done by the DLL. I'd like to know if this is safe. And is it
possible to deallocate it on the EXE, if I link the DLL and the EXE to
the multithreaded DLL CRT?
Thanks,
Ronaldo
- Posted by Stephen Kellett on January 25th, 2005
In message <4916ceb.0501250210.5cb05c3f@posting.google.com> , Ronaldo
Tomazeli Duarte <ronaldotomazeli@ig.com.br> writes
Yes.
Yes. If you use the multithreaded DLL CRT for *both* the EXE and DLL.
Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk
RSI Information: http://www.objmedia.demon.co.uk/rsi.html
- XP Memory allocation (Performance/Maintainence) by JIM_ML
- Big allocation AND per process memory! (Microprocessors) by Ali
- Memory allocation in device memory. (Development Resources) by David Reid
- Memory allocation strategy (Development Resources) by Bob Masta
- Memory allocation question... (Development Resources) by Sin

