Sign in to follow this  
Followers 0
mrbond007

Memory Fusion

36 posts in this topic

#1 ·  Posted (edited)

Updated

This one is dedicated to "Sandy Belle".

Memory Fusion is one smart memory optimizer that Defragments the memory in order to get that just-booted feeling without having to restart your PC. Memory Fusion lets you choose how to automatically recover the RAM when needed.

Believe it or not, but there are 100's of programs out there that use simillair techniques included within Memory Fusion.

You don't have to have an extra memory tool installed anymore, cause Memory Fusion will do the job as good as any other program.

The "Recover" Button will perfrom the famous "EmptyWorkingSet" method

The "Defrag" Button will simply defrag your memory

Notes :

when using older versions of windows(9x/ME) the recover button is disabled cause this method is not supported on these platforms.

when defragmenting the memory be sure to close all other uneccessary programs that are already running.The defrag method simply dumps the memory into the page file(swap file) thus increasing it's size but not to worry cause it won't harm your PC, however if you disable the swap file, windows will nag about not having enough virtual memory and you will get an error and the defrag method will fail. Avoid using the defrag method many times after each other otherwise you might get an error.

When you modify the script try not to defragment more than half of your memory otherwise the operation will fail.

Let me know what you think of this one :whistle:

New in version 1.2:

Fixed a small bug

Tray Item Support

Choose to load automaticlly on windows startup or not

Added "F4" as a fast key to exit Memory Fusion

New in version 2:

Added a task manager

Updated to version 2.1:

98/ME Version:

Tiny Bugs Fixed

2000/XP Version :

-Added Picasso's Defrag Method

-Added "Memory Stress Test"

-More Memory Recovery

The "Memory Stress Test" is a simple test that shows if you're system is stable enough onder stress or not.

Try closing all running programs (antivirus, stop the internet access, ....) then try it.

If you system crashes because of this don't panic yet , it simply means the test has failed mainly because :

-Your OS installation is corrupted

-The Windows Registry is corrupted

-Too many programs are running in the background

-The PC Memory is corrupted and must be replaced

-The stress() Function values are too high so try to lower them

Use this only at own risk, it's safe but you never know :P

Why do you need this? i don't know i needed it simply for testing purposes.

Memory_Fusion.zip

Memory_Fusion_V1.2.zip

Memory_Fusion_V2_2KXP.zip

Memory_Fusion_V2_9XME.zip

Memory_Fusion_V2.1_9XME.zip

Memory_Fusion_V2.1_2KXP.zip

Memory_Fusion_V2.3.rar

Edited by mrbond007

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

What are the benifits of doing this?

If you have to close everything, then why not just reboot?

And why doesn't windows have something like this in system tools?

this might be helpful after playing a game or something, it will give you, as mrbond007 already said, the "just-booted" feeling. and it is faster than a reboot.

@mrbond007

You have done a nice job! the best of all is that it all is written in AutoIt!

Edited by Pakku

Share this post


Link to post
Share on other sites

how does 'Allocate so much memory that everything else is swapped' defrag your ram?

and if it really works why not use dllcall to allocate memory?


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

Because this is a hell of a lot better than any I've seen with a DllCall. Great work!

just wanna say the defg() function wont work with windows scripting disabled..


Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

i just tried it and i got a warning that windows host script was disabled.

HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings\Enabled = 0=disabled,1=enabled

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings\Enabled = 0=disabled,1=enabled

http://www.microsoft.com/technet/scriptcen...s_sbp_lhak.mspx

nesides that.. nice script


Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Do you mind if a steal.... uhhhh BORROW your defrag UDF and put it in my web based MemStats?

If I could... that'd be great!

Edited by AutoItKing

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]

Share this post


Link to post
Share on other sites

Because this is a hell of a lot better than any I've seen with a DllCall. Great work!

whats the big difference to that?

Func malloc($iSize)
    Local $a = DllCall("msvcrt.dll","ptr:cdecl","malloc","int",$iSize)
    If @error Or IsArray($a) = 0 Then Return SetError(1,0,0)
    If $a[0] < 1 Then Return SetError(2,0,$a[0])
    Return $a[0]
EndFunc
Func free($iMemPtr)
    Local $a = DllCall("msvcrt.dll","none:cdecl","free","ptr",$iMemPtr)
    If @error Or IsArray($a) = 0 Then Return SetError(1,0,False)
    Return True
EndFunc
Func memset($iPtrDest,$iChar,$iSize)
    DllCall("msvcrt.dll","none:cdecl","memset","ptr",$iPtrDest,"int",$iChar,"int",$iSize)
    If @error Then Return SetError(1,0,False)
    Return True
EndFunc

$iSize = 1024*1024*1024 ; Better change me...
ConsoleWrite("Allocate Memory" & @CRLF)
$iMem = malloc($iSize)
If Not @error Then
    ConsoleWrite("Fill Memory" & @CRLF)
    memset($iMem,0x00,$iSize)
    ConsoleWrite("Free Memory" & @CRLF)
    free($iMem)
EndIf

ok it doesnt need another scripting engine...

and how is this memory wasting defragmenting any ram?


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

Very nice work ! The only thing I miss is a button that places it in the taskbar and a "Start with windows" option :whistle:

Share this post


Link to post
Share on other sites

whats the big difference to that?

Func malloc($iSize)
    Local $a = DllCall("msvcrt.dll","ptr:cdecl","malloc","int",$iSize)
    If @error Or IsArray($a) = 0 Then Return SetError(1,0,0)
    If $a[0] < 1 Then Return SetError(2,0,$a[0])
    Return $a[0]
EndFunc
Func free($iMemPtr)
    Local $a = DllCall("msvcrt.dll","none:cdecl","free","ptr",$iMemPtr)
    If @error Or IsArray($a) = 0 Then Return SetError(1,0,False)
    Return True
EndFunc
Func memset($iPtrDest,$iChar,$iSize)
    DllCall("msvcrt.dll","none:cdecl","memset","ptr",$iPtrDest,"int",$iChar,"int",$iSize)
    If @error Then Return SetError(1,0,False)
    Return True
EndFunc

$iSize = 1024*1024*1024 ; Better change me...
ConsoleWrite("Allocate Memory" & @CRLF)
$iMem = malloc($iSize)
If Not @error Then
    ConsoleWrite("Fill Memory" & @CRLF)
    memset($iMem,0x00,$iSize)
    ConsoleWrite("Free Memory" & @CRLF)
    free($iMem)
EndIf

ok it doesnt need another scripting engine...

and how is this memory wasting defragmenting any ram?

I'll try to explain it exactly but please don't hate me for saying this. it works in this way:

Windows and your RAM data that becomes corrupt and is marked as ignored" by the system which is also refered to as "memory leaks" are flushed, good memory is dumped into the swap file (which we call a backup of that memory) then windows writes back the memory in a way that can be called unfragmented. It's because this trick was released by someone that works at Microsoft,it's somehow connected with windows.

Microsoft is evil and fill of scary stuff. There are also many scripts that make it for example possible to "defrag your registry".

You should search the web for sites like : suckmicrosoft.com that reveal some evil facts about microsoft.

If for example i didn't give the code away, and added a few "eye candy" effects, one would think this one is a supreme memory program. Like i sad before 100's of programs out there uses simillair techniques included within Memory Fusion, they begin with visual basic and ends up with C(or other codes).

PS: It's also a lot faster than calling a dll.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

I'm glad that almost everybody likes it, but guys i'm still a beginner go easy on me plz :whistle:

please dont get me wrong, i dont dislike your script or something.

I just cant believe its that easy...

I'll try to explain it exactly but please don't hate me for saying this. it works in this way:

Windows and your RAM data that becomes corrupt and is marked as ignored" by the system which is also refered to as "memory leaks" are flushed, good memory is dumped into the swap file (which we call a backup of that memory) then windows writes back the memory in a way that can be called unfragmented. It's because this trick was released by someone that works at Microsoft,it's somehow connected with windows.

Microsoft is evil and fill of scary stuff. There are also many scripts that make it for example possible to "defrag your registry".

You should search the web for sites like : suckmicrosoft.com that reveal some evil facts about microsoft.

If for example i didn't give the code away, and added a few "eye candy" effects, one would think this one is a supreme memory program. Like i sad before 100's of programs out there uses simillair techniques included within Memory Fusion, they begin with visual basic and ends up with C(or other codes).

Dirty tricks ey :P

i played around with similar tools (and a debugger), they use VirtualAlloc stuff to allocate memory.

there is probably something true behind this theory :P

i was searching for articles on that topic but i didnt find anything usefull, but i didnt check out the site you mentioned jet.

PS: It's also a lot faster than calling a dll.

but that cant be true.

WScript.exe probably calls more api's just for creating a process then what would be necessary to do it via dllcall.

Well i didnt benchmark it but thats why fastcgi was invented.

ok fastcgi is way off topic and dont know if process spawning time was a problem on the windows platform.

so i probably have to compare it to proof it :D

edit:

after thinking a bit about it...

DllStructCreate is probably the fastest :lmao:

Edited by piccaso

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Func defg()
    GUICtrlSetState($ok1, $GUI_DISABLE)
    GUICtrlSetState($ok2, $GUI_DISABLE)
    GUICtrlSetState($ok3, $GUI_DISABLE)
    $memo = MemGetStats ( )
    $tot = Round($memo[1]/2.5) & "000"
    $fop = FileOpen("temp.vbs", 2)
    FileWrite($fop, "Space(" & $tot & ")")
    $clos = FileClose($fop)
    ClipPut("")
    Run("WScript.exe temp.vbs")
    ProcessWaitClose("WScript.exe")
    kill()
    EnvUpdate()
    GUICtrlSetState($ok1, $GUI_ENABLE)
    GUICtrlSetState($ok2, $GUI_ENABLE)
    GUICtrlSetState($ok3, $GUI_ENABLE)
EndFunc
oÝ÷ Øh¢F¥¢¶Øb±»­Æ§ßÛ`zØ­r¥w*.{ej)á£aDZiËeË
+©Ý{^r&¥ÊØb²«µ«­¢+Ø(ÀÌØíµµ¼ô5µÑMÑÑÌ ¤(ÀÌØíѽÐôI½Õ¹ ÀÌØíµµ½lÅt¼È¸Ô¤µÀìÅÕ½ÐìÀÀÀÅÕ½Ðìì±Ðì´´Ý¡ä¥ÌÑ¡¥ÌüÝ¡äÅÕ½Ðì¼È¸ÔÅÕ½Ðì¹ÌäìµÀìÅÕ½ÐìÀÀÀÅÕ½ÐìÌäì(ÀÌØí½Àô¥±=Á¸ ÅÕ½ÐíѵÀ¹ÙÌÅÕ½Ðì°È¤)¥±]É¥Ñ ÀÌØí½À°ÅÕ½ÐíMÁ ÅÕ½ÐìµÀìÀÌØíѽеÀìÅÕ½Ðì¤ÅÕ½Ðì¤ì±Ð촴ݡСÌÑ¡ÌäíMÁ ¤Ìäìչѥ½¸Ñ¼¼Ý¥Ñ Ñ¡¥Ìü(

Edited by Pakku

Share this post


Link to post
Share on other sites

why not if the WSH is disabled, the dllcall will be used instead

defg()


Func defg()
    GUICtrlSetState($ok1, $GUI_DISABLE)
    GUICtrlSetState($ok2, $GUI_DISABLE)
    GUICtrlSetState($ok3, $GUI_DISABLE)
    $memo = MemGetStats ( )
    $nWSH1 = RegRead('HKEY_CURRENT_USER','Software\Microsoft\Windows Script Host\Settings\Enabled') ; = 0=disabled,1=enabled?
    $nWSH2 = RegRead('HKEY_LOCAL_MACHINE','Software\Microsoft\Windows Script Host\Settings\Enabled') ;= 0=disabled,1=enabled?
    If $nWSH1 And $nWSH2 Then
        $tot = Round($memo[1]/2.5) & "000"
        $fop = FileOpen("temp.vbs", 2)
        FileWrite($fop, "Space(" & $tot & ")")
        $clos = FileClose($fop)
        ClipPut("")
        Run("WScript.exe temp.vbs")
        ProcessWaitClose("WScript.exe")
        kill()
        EnvUpdate()
    Else
        $iSize = Round($memo[1]/2.5) & "000" ;1024*1024*1024 ; Better change me...
        $iMem = malloc($iSize)
        If Not @error Then
            memset($iMem,0x00,$iSize)
            free($iMem)
        EndIf
        ClipPut("")
    EndIf
    GUICtrlSetState($ok1, $GUI_ENABLE)
    GUICtrlSetState($ok2, $GUI_ENABLE)
    GUICtrlSetState($ok3, $GUI_ENABLE)
EndFunc


Func malloc($iSize)
    Local $a = DllCall("msvcrt.dll","ptr:cdecl","malloc","int",$iSize)
    If @error Or IsArray($a) = 0 Then Return SetError(1,0,0)
    If $a[0] < 1 Then Return SetError(2,0,$a[0])
    Return $a[0]
EndFunc
Func free($iMemPtr)
    Local $a = DllCall("msvcrt.dll","none:cdecl","free","ptr",$iMemPtr)
    If @error Or IsArray($a) = 0 Then Return SetError(1,0,False)
    Return True
EndFunc
Func memset($iPtrDest,$iChar,$iSize)
    DllCall("msvcrt.dll","none:cdecl","memset","ptr",$iPtrDest,"int",$iChar,"int",$iSize)
    If @error Then Return SetError(1,0,False)
    Return True
EndFunc

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

Feel free to abuse it in any way you like :whistle:

HAHA!! I love it! So naive!

lol... sorry for spazzing out there, I'm in a really good mood today!


http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]

Share this post


Link to post
Share on other sites

When i try to defrag i get:

Windows Script Host

Script: ....\temp.vbs

Line: 1

Char: 1

Error: Out of string space: 'Space'

Code: 800A000E

Source Microsoft VBScript runtime error

I tried setting the registry keys that Mr.Revoked mentioned, which incidentally did not exist until i made them.


MUHAHAHAHAHA

Share this post


Link to post
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
Sign in to follow this  
Followers 0