Jump to content

RAM FREE v0.1


DCCD
 Share

Recommended Posts

Hey there,

Here's my version

OS

WIN_XP =

WIN_VISTA = I really don't know :party::)

_RAMFREE()
;
Func _RAMFREE()
    If ProcessExists("rundll32.exe") Then
        ProcessClose("rundll32.exe")
    EndIf
    Run("rundll32.exe advapi32.dll,ProcessIdleTasks")
    While 1
        $mem = MemGetStats()
        $results = "Memory Load: " & $mem[0] &" %" & @CRLF
        $results &= "Total physical RAM: " & $mem[1] &" Kb" & @CRLF
        $results &= "Available physical RAM: " & $mem[2] &" Kb"
        TrayTip("RAM FREE v0.1", $results, 30, 1)
        Sleep(99)
        If Not ProcessExists("rundll32.exe") Then
            MsgBox(0, "RAM FREE v0.1", "complete."&@CRLF&@CRLF&$results)
            Exit
        EndIf
    WEnd
EndFunc
Link to comment
Share on other sites

I should suggest some more research (or at least explanation) before continuing this project...

The file placement optimization, which is done no more often than once every three days, is an example of a task that is carried out when the system is deemed to be idle. System Restore and other features of Windows XP also attempt to defer some work until the system is deemed to be idle. There are also some done-once-after-setup work items that also operate under the Idle Task Scheduling mechanisms.

All of these "idle tasks" are controllable by a system API in advapi32.dll, ProcessIdleTasks. The APIs sole purpose is to allow benchmarks a simple way to force any pending idle tasks to be executed immediately, without having to wait a lengthy period of time.

And:

When called from the command line, the ProcessIdleTasks work is done in the background asynchronously. It can take 10 to 15 minutes for idle tasks to complete. Task Manager will report processes running, and the disk will likely be active during this time.

Which, as other articles state and the MS statement backs up - this doesn't decrease anything directly, if at all.

It MAY keep any "Idle" scheduled tasks from running at a later time (when your system is actually idle), but it does not actively lower any significant figures while your computer is in-use.

Rather, this has your computer do NOW what it would have done when you weren't using it at all.

Perhaps if you had ALOT of idle processes, this would free the memory used to keep them scheduled - but that is usually an insignificant amount and, more importantly, dependent upon the user.

I'm also unsure why the OP has insisted on calling this script "RAMFREE", despite it's real results.

Works Cited:

Microsoft <http://www.microsoft.com/whdc/system/syspe...chmark.mspx#EFF> (*Note: URL no longer valid)

Microsoft, Benchmarking on Windows XP <http://www.microsoft.com/whdc/archive/benchmark.mspx> (*Note: Current URL!)

Article: Article 1

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

Only if you have any idle tasks scheduled; by the effect of getting the task over with.

If you have no idle tasks to process in the first place, the effect is nil.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

thanks guys,

& about the script, read this. it will only take about 20 sec(s)

Make a shortcut on your desktop wit this:

%windir%\system32\rundll32.exe advapi32.dll,ProcessIdleTasks

takes a ew seconds to run, and it will recover memory for you. Depending on what you are doing, it may not do much or it may help a bunch. Have fun!

-V

Edited by DCCD
Link to comment
Share on other sites

  • 2 weeks later...

one doubt, why is the rundll process being closed at the startup ? is it for singleton, then i would suggest calling the commandline of the process and comparing if it is our process which generated the thread. because i have noted rundll32 being run by google products in a few pcs now a days.

Link to comment
Share on other sites

one doubt, why is the rundll process being closed at the startup ? is it for singleton, then i would suggest calling the commandline of the process and comparing if it is our process which generated the thread. because i have noted rundll32 being run by google products in a few pcs now a days.

If Not ProcessExists("rundll32.exe") Then
            MsgBox(0, "RAM FREE v0.1", "complete."&@CRLF&@CRLF&$results)
            Exit
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...