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

Re: Re: Re: Memory usage and perl

by derby (Abbot)
on Mar 14, 2003 at 16:25 UTC ( #243106=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Memory usage and perl
in thread Memory usage and perl

fokat++ ... but just to nitpick mmap and certain mallocs (and under certain conditions) will return the memory to the system. Check out the Unix Programming FAQ section 1.12.

-derby


Comment on Re: Re: Re: Memory usage and perl
Re^4: Memory usage and perl
by fokat (Deacon) on Mar 15, 2003 at 16:12 UTC

    Thanks a lot for the reference, derby (and ++ for your nitpicking). I have a small difference, though...

    Actually, mmap() does not allocate memory. What it does is map pages belonging to a file, probably from the buffer cache, into your process' private address space. Certainly it is a neat trick, but might have undesired side effects when competing with file-related resources in the same machine, specially with a static buffer cache.

    They will "return" the memory to the OS because the memory was not originally allocated to your process. I am glad to see certain implementations of malloc() and free() taking advantage of this.

    Best regards

    -lem, but some call me fokat

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2015-07-04 20:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls