Skip to main content
0 online

VB Scripting

ok4now by ok4now · Jun 18, 2003 · 125 views · Ask eZabel

anyone know of the script that clears memory in Win2K?



a few years ago, i had this script. i thought it was simply "myspace(xxx)" where 'xxx' is a number like 50,000 (it depends on your computer). anyway, you're supposed to save it as a .vbs file, and it's a hardcore memory clearer.



any takers?

To contribute to the discussion, please log in.

11 Comments

iwz #1 iwz

a memory clearer?? for what purpose?

malibu #1.1 malibuOG 2001

he would tell you, but he forgot.

deanh77 #1.1.1 deanh77Founder

haha. that gave me a chuckle.

ok4now #1.2 ok4nowOG 2002

it's a little trick to recapture memory that was fragmented from opening and closing programs.

hunkpapap #2 hunkpapapOG 2003

OOOOOOOOOOOOOOOOOOOOOOPSS!!! MY bad..

ok4now #3 ok4nowOG 2002

well, i found the file on my home computer. i had the class spelled right, but maybe it's case-sensitive. i'll have to check out my work computer tomorrow.

ok4now #4 ok4nowOG 2002

This is only for Win2K or WinXP. I don't know whether it works for WinMe or before...



found the correct script. it's: Mystring = Space(20000000)



you can create this in Notepad. Just save the file as a .vbs file, like "Memory Refresh.vbs" and put it on your desktop.



To see it in action, open your Task Manager. Click the "Performance" tab. Take a note of the "Available" memory and the "System Cache." Double click the "Memory Refresh" script. Wait a bit. You'll see the Available memory drop to a couple thousand for a few seconds. Then it will suddenly jump up. Sometimes your available memory will double.



Adjust the number a few times to see what has the greatest affect. I added a zero to the above number and that recovered about 50000K for me.



if you haven't broken your machine, let me know how it goes.

iwz #4.1 iwz

you realize that Space(x) just returns a string x number of spaces long, right? so, basically this script will create a 20MB file in memory and then exit, hence freeing up that memory. what's the point?

ok4now #4.1.1 ok4nowOG 2002

the point, son, is that it creates a contiguous block of memory of that size. in effect, it defragments RAM.

skaorsk8 #4.1.1.1 skaorsk8OG 2002

you know, there used to be a program to do that. except, i figured out that it was just sending what was in RAM to the hard drive, and then sending it back. so, I guess it was doing SOMETHING, just not anything especially useful

ok4now ok4nowOG 2002

well, this is a do-it-yourself-er

Welcome Back to eZabel

It's been a while. Here's what's new.

eZabel Lore

A complete history of our community — stats, Hall of Fame, legendary threads, and more.

View the Lore →

Curator Commentary

Look for the blue speech bubbles on threads, profiles, and news — notes and context from iwz.

Everything Preserved

All 225,969 pieces of content from 2000–2014 are here — forums, messages, journals, photos, polls, and events.