Re: DLL memory leaks

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
eukat said...
jimcbrown said...

it seems he got hung up by the fact that the std library allocated some memory w/o ever freeing it,

And i suggested doing the same for DLLs, allocate a hunk, perhaps under programmer control, of a size large enough to accomodate the largest DLL to be loading and unloading, then never free it. Just keep re-using it. In 2012.

I am stunned.

The problem is that different dlls, or even the same dll loaded, unloaded, then reloaded, do not communicate each other's memory system. There's no easy way to tell a DLL, "Last time you allocated this memory block and never freed it before being unloaded, so use it again."

While in principle it can be done, I suspect that in practice it'll be a lot easier to just find a way to free the memory.

There are different issues involved. First, there is the overhead in the back end of euphoria for managing a dll. Second, there is the memory allocated by the dll itself. I was working on the memory that the dll would allocate for itself.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu