Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: make perl release memory

by broquaint (Abbot)
on Jun 19, 2003 at 14:48 UTC ( #267212=note: print w/replies, xml ) Need Help??

in reply to make perl release memory

Unless you're OS supports processes releasing memory back to the system while running this can't be done. See. Memory usage and perl for another discussion on this very topic.


Replies are listed 'Best First'.
Re: Re: make perl release memory
by batkins (Chaplain) on Jun 19, 2003 at 14:59 UTC
    How about Win32? Can't I just call free()?

    milkbone - perl/tk instant messaging - it's the only way to fly

      Well, a cursory test of:

      main() { char *foo = (char *)malloc(1000000); getch(); free(foo); getch() }
      Examined in task manager would suggest not, of course this is highly unscientific and someone else might know different.

      Using free(ptr) will just make available the memory pointed to by ptr in the process' memory pool, not to the OS at large. This memory freeing behaviour isn't Win32 specific, but applies to most modern OSes.


      Perl already does.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://267212]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2017-06-26 23:33 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (595 votes). Check out past polls.