I got a shareware program that supposedly defragments memory in
Windows.

Any ideas what kind of VC++ functions it is probably using?

Re: defragmenting memory by Doug

Doug
Tue Sep 19 20:13:41 CDT 2006

On 19 Sep 2006 14:26:16 -0700, mike7411@gmail.com wrote:

>I got a shareware program that supposedly defragments memory in
>Windows.
>
>Any ideas what kind of VC++ functions it is probably using?

No, but this program is probably just as useful:

int main()
{
}

--
Doug Harrison
Visual C++ MVP

Re: defragmenting memory by Carl

Carl
Tue Sep 19 23:11:53 CDT 2006

Doug Harrison [MVP] wrote:
> On 19 Sep 2006 14:26:16 -0700, mike7411@gmail.com wrote:
>
>> I got a shareware program that supposedly defragments memory in
>> Windows.
>>
>> Any ideas what kind of VC++ functions it is probably using?
>
> No, but this program is probably just as useful:
>
> int main()
> {
> }

...more useful, even, since you know that it's doing no harm. The same
cannot be said for "memory defragmentors".

-cd



Re: defragmenting memory by Bruno

Bruno
Wed Sep 20 04:45:48 CDT 2006

>I got a shareware program that supposedly defragments memory in
> Windows.
>
> Any ideas what kind of VC++ functions it is probably using?

I read about these tools in 'Windows internals, 4th edition' by David
Solomon and Mark Russinovich.
It's a must read if you want to know more about how and why windows does
certain things a certain way.

Basically, these tools are meant for only 1 thing: getting your money.

What most of these tools do is simply to allocate huge blocks of memory,
causing the memory manager to page out a lot of memory that is used by other
processes. As a result, the working set of physical memory of those
processes becomes smaller, and possibly gets moved as well to accomodate for
the huge memory request from the tool.
Then the tool de-allocates that memory, and voila: lots of free RAM and
fewer gaps between blocks that are actually in use.

Of course, the net result is that performance will suffer, because all
active processes need to page in the memory that was first paged out, and
the cache is gone as well.

The Windows memory manager is very good at what it does. In general, the
memory manager knows better than you how to manage memory. The only
exception would be in very specific situations where you could use
look-aside lists to have control over your memory allocation behavior.

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"