Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How I want my memory managed

by agentv (Friar)
on Dec 10, 2002 at 21:50 UTC ( #218930=note: print w/ replies, xml ) Need Help??


in reply to How I want my memory managed

My current preferred method is lazy heap management. Information is kept intact (even when it's not referenced) until it is absolutely necessary to reuse the memory for something else. In the event that the information is requested again and the memory has not been overwritten, reclamation is swifter.

Coincidentally, this is similar to how the Solaris kernel manages buffer cache memory pages. (And also pages stolen from an active process.) These pages are placed on a special "free list" (called the cache list) and will only be utilized when the traditional free list is empty.

As a human, I've also adopted this strategy with respect to reclamation of disk space. Even though I know something is no longer in use, I keep it around on the chance that it might be useful for something later. When space is at a premium, I can then use some procedure for cleaning out old stuff.

Does this lead to chaos? You bet. But with a good search engine and clever indexing, I can find my way through the uproar to the information that interests me.

Now, if only I can get the screaming in my head to stop!

...All the world looks like -well- all the world, when your hammer is Perl.
---v


Comment on Re: How I want my memory managed

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://218930]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-12-25 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls