Results 1 to 28 of 28

Thread: Hopeless: memory not being released

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member TupacShakur's Avatar
    Join Date
    Mar 2002
    Location
    Da Land Of Da Heartless...
    Posts
    493

    Unhappy Hopeless: memory not being released

    This is a hopeless case. I might as well finish writing an O.S before solving it, but here goes:

    This problem is related to the topic of the other thread i posted few days ago, and titled: Huge Files/Memory Problem (Link).
    That thread prompted me to change the whole structure of my program to adapt to the use of small (1 or 5 MB) buffers in reading from huge files (a 500 MB file for example), instead of the 100 MB buffer i was using at some point. Now the new way naturally has a longer loop (100 times x 5MB) instead of (5 times x 100MB).

    In the old way, i was using a string buffer that i was freeing after each iteration by doing: StringVariable = "", thus freeing the RAM. At the end of the procedure, RAM (that went down by 200 MB's cause each byte is represented by 2 bytes in a String type variable) would return to normal.

    In the new way (which should be much better), it seems that the long loop is at some point (1/3 of the way) freezing the memory freeing. Meaning that the StringVariable = "" is doing **** from some point on, thus getting the Ram down to 5 MB, and staying like that after the end of execution (although i am using the same variable as the buffer).

    So what can i say??? HEEEEEEEEEEEEEEEEEELLLPPP!!!!!!!!!


    P.S: I searched this forum, and it seems the the only way to free a string var (and what Microsoft has suggested doing) is the StringVar = "" statement.
    Last edited by TupacShakur; Mar 17th, 2005 at 12:29 PM.
    "And Now I'm Lika Major Threat, Cause I Remind U Of The Things U Were Made To Forget!" - (2PAC)

    "Now They Label Me a Lunatic, Couldn't Care Less, Death or Success is What I Quest, Cause I'm Fearless!" - (2PAC)

    " There's a light at the end of every tunnel, just pray it's not a train!! "



    I am 100% addicted to Tupac. What about you?
    I am 24% addicted to Counterstrike. What about you?
    The #1 Tupac Fans Web Site | The Official Tupac Web Site

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width