About | Buy Stuff | News | Products | Rants | Search | Security
Home » Resources » Software » Reviews » Rainmaker Redux

Rainmaker Redux III:

What Gets Cleaned Up?

So what exactly is Fred hoping to get cleaned up?

Are DLLs that should no longer be in use going to be cleaned up?

Well, to do this under Win9x would entail using the ToolHelp32 library, enumerating all the DLLs (modules) currently in use, then meticulously cross-checking each and every one with the process list obtained from that same library in a separate enumeration. And of course as soon as anything else happens in the machine - starting all over again. Maybe going into an infinite loop.

On NT it's even worse, if that is possible. NT doesn't have the ToolHelp32 library, NT has the performance data key. This is unwieldy to say the least. The technique is of course the same. Find out, for each and every process in the system, which modules are loaded on its behalf. Establish usage counts for each module. Cross-check this with an actual module list.

And of course start all over again if anything at all happens. This is always fun on NT, as the services process might kick anything into being at any time. 9x is not much nicer about it either.

So that's what you'd have to code to make unused DLLs disappear.

Yes, the obvious question is: where the heck are they hiding? As DLLs are mapped into the address space of their client processes, when these client processes disappear, either through a nice exit or a yank yer guts out termination, that process memory by definition is gone. It is freed - and the DLL with it. So where would they be?

But perhaps the system can still get out of whack. And if so, an intense and secure cross-checking method of finding orphaned DLLs would be necessary. If it's at all possible; if it's at all feasible; and most importantly, if it's at all being used by these rainmakers.

Which it of course is not.

What if you're only after freeing memory, other kinds of unused resources?

  Resources? We don't need no stinkin' resources!

About | Gallery | News | Order the XPT | Products | Resources | Security | Services | Workshop
Copyright © Radsoft. All rights reserved.