by Max Christian Pohle (9 Submissions)
Category: Windows API Call/Explanation
Compatability: VB Script
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(5 Votes)

It completely fills your Memory with Data. Windows than cleans up its memory automatically. The effect is that after releasing the memory again more memory is aviable than before.
This is a popular method that is used by many RAM-Cleaners, but I have never seen it as VB-Code.
Inputs
its all included but if your experienced just unzip the Module1.bas and execute the FreeMem-function inside.
Assumes
please do not execute the code twice (you know why...) :-)
Code Returns
The FreeMem-Function returns how many Megabytes of memory were released.
Side Effects
After releasing memory some applications have to load their data again. In short: You will recognize that you system is running slower after the cleanup and the harddrive-activity increases, although you have more memory aviable.