in reply to Re: Memory reusability
in thread Memory reusability

Of course this does not mean that part of the memory not used by Perl, automatically can be used by other application. This question belongs to the architecture of the undrelying OS, and is not related to Perl.
That's not entirely true. Certainly, whether or not the OS is able to accept memory back from the OS isn't related to perl. But if perl runs on an OS that does allow for processes to return memory back to the OS during the lifetime of the process, then it becomes related to perl. Because then perl would actually have to make the appropriate system calls to give memory back.

Replies are listed 'Best First'.
Re^3: Memory reusability
by rovf (Priest) on Aug 12, 2009 at 13:07 UTC
    then it becomes related to perl.

    Thank you for clarification. To be more precise: It becomes related to the Perl implementation (not to Perl as a language), i.e. ActiveState Perl could do it one way and Strawberry Perl could do it another way.

    -- 
    Ronald Fischer <ynnor@mm.st>
Re^3: Memory reusability
by zwon (Abbot) on Aug 12, 2009 at 17:46 UTC
    Because then perl would actually have to make the appropriate system calls to give memory back.

    Perl should just use standard free(3) function and this function will make appropriate system call to return memory to OS.

      Whether free(3) returns memory depends on the OS. And whether perl calls free(3) depends on whether you build perl with its own malloc implementation, or whether it's using the system one. Which one is used depends on the setting of the usemymalloc configuration flag, and, in the absence of the flag, whatever hint is set for your OS in the hints directory.