Page 2 of 2

MEMORY LOSS v1.0 ;)

Posted: Mon Oct 20, 2003 3:43 pm
by NoahPhense
muab256 wrote:this one looks nice =)

at least it works, ur right, its not the fastest solution, but
- one can try to make it better
- its way not as slow as i expected after reading ur post ;P

many thx
Ok, I've had a few more minutes to tool with it..

Quite fast now.. and on the fly. Sorry for the elongated post. But it had to be that way.

- john

Code: Select all

code remove.. see below

Posted: Mon Oct 20, 2003 4:56 pm
by blueznl
why not replace readdata with lset() ?

good idea..

Posted: Tue Oct 21, 2003 1:05 am
by NoahPhense
blueznl wrote:why not replace readdata with lset() ?

Yeah, that's a great idea.. I'm still learning the language.. ;) I think this is like my 14th post..

Thanks for the tipage!!

- john

Code: Select all

DefType.s Data1
;- CREATE 1K
Data1 = LSet("", 1000, "a")

NewList Memory.s()

;- CREATE 64K
For x = 1 To 6
    Data1 = Data1 + Data1:; CREATING 64K
Next x

;- RUN CONSOLE
If OpenConsole()
    ConsoleTitle("Memory Loss v1.0")
    Print("megs: ")
    megs.s = Input()
    megsNumber.w = Val(megs)
    PrintN("")
    If megsNumber = 0
        Goto GetOut
    EndIf

    ;- CREATE 1024K
    For x = 1 To megsNumber*16:; 64K X 16 = 1024000
        AddElement(Memory())
            Memory() = Data1
    Next x

    PrintN("done..")

    Repeat
    Until Inkey()<>""
    GetOut:
    CloseConsole()
EndIf

ClearList(Memory())
End

Re: good idea..

Posted: Tue Oct 21, 2003 1:12 pm
by muab256
NoahPhense wrote:
blueznl wrote:I'm still learning the language.. ;)
hehe, imho we all do... forever ;P
great... had allready a faster mod of urs (but not as accurate as urs)...
well, this one looks even faster =)

muab

Re: good idea..

Posted: Tue Oct 21, 2003 3:26 pm
by NoahPhense
muab256 wrote:hehe, imho we all do... forever ;P
great... had allready a faster mod of urs (but not as accurate as urs)...
well, this one looks even faster =)
Kewl, glad it works for ya.. It's a pretty good core start. If I was building it, from there, I would probably get how much physical memory is on the EU's (enduser) machine. I'm sure there is a simple API for that.

Then I would probably allow the user to set where he/she would like the mem-recovery to take place. Look back at the screen shots, to see the different features, like Target Free Ram.. that's when its doing a scrub, where it should stop. Because if you try to recover all physical memory, it will work, BUT, you will have really slowed down the box for a while.. because you've crapped everything that was running into the swap file.

i.e. - When the memory hits 80mb's, run defrag.

I'm just basing those ideas off of my currrent memory program, as they are pretty nice.

- AutoRecovery Level
- a button to manually kick off the defrag

There are many features, you just have to be creative. To me, thats the fun part about programming. The creation process.

- john

Posted: Tue Oct 21, 2003 8:15 pm
by muab256
think such feature loaded ram defrager are enough out there...
so here what i do:

a "screen saver" which will free up ram and set the disk cache very
high, and reduces cache/frees ram again when system is in use again =)

muab