Recently I downloaded some horribly coded P.O.S. called "TweakXP" which is supposed to be like M$'s Tweak UI. It's got little knick-knacks in it for optimising and customising your XP system and whatnot. It crashed my system a few times and did other things I wasn't happy about. Needless to say I uninstalled it and later I'm having a witch doctor come over to exorcise the demons it left on my hard drive.


ANYWAYS, most of the things it does is just trivial registry tweaks, but one function it performs is releasing some of your (presumably) unused memory. For me it cleared up a good 80mb of RAM. This is something I've seen before, I just can't remember what program.


So my question is, does anybody have any idea how to do this? Is there any Win32 ASM code out there already written, or does anybody know where I might locate some info about it? I'd like to write my own.


Thanks ;)
Posted on 2002-08-26 14:52:26 by iblis
I dont know if this is what you mean, but an easy way to clean up some memory
is to allocate a really large chunk of memory, e.g. half of the available physical RAM
and free this chunk again immediatly.

This will cause windows to free all possible memory blocks and swap out some
moveable memory.
Posted on 2002-08-27 03:49:02 by beaster
Beaster,

Funny enough recently I was playing with a tool that allocated ALL physical memory and it definitely forces windows to clean up the mess, if you read the free memory directly after the allocation, then the deallocation, the difference is very substancial.

Regards,

hutch@movsd.com
Posted on 2002-08-27 07:28:25 by hutch--
I've been using a great freeware (register ware) program from analogx, called maxmem

it periodically does the memory 'compact' and show a nice little graph in the system try

only about 200k download too
Posted on 2002-08-27 09:47:53 by Terab
Yes this is what I'm talking about. Thanks for the info, guys. :)

Is this really how it's done? Seems hack-ish to me. Almost like exploiting a Windows bug.
Posted on 2002-08-27 19:28:30 by iblis
I don't know, 200k sounds large for something that just allocates and deallocates memory.
Posted on 2002-08-28 02:20:36 by eet_1024

I don't know, 200k sounds large for something that just allocates and deallocates memory.


did I mention the cool little system tray thingy :grin: makes the 'bloatware' seem worthwhile :grin:

Just one thing about the alloc big amounts of memory and dealloc again to free mem, if you are running SQL server 7 on NT it doesnt seem to like this method.
Posted on 2002-08-28 07:22:20 by Terab
Guys, you should read this:

http://www.radsoft.net/resources/software/reviews/redux/

It's quite a long text, but still worth reading. It's about all those RAM-freeing utilities, and there is an example written in C to achieve the same thing.
Posted on 2002-08-28 08:26:50 by Delight