In Perl, how can I release memory to the operating system?

前端 未结 4 1310
野性不改
野性不改 2020-12-05 08:30

I am having some problems with memory in Perl. When I fill up a big hash, I can not get the memory to be released back to the OS. When I do the same with a scalar and use

4条回答
  •  温柔的废话
    2020-12-05 08:50

    Why do you want Perl to release the memory to the OS? You could just use a larger swap.

    If you really must, do your work in a forked process, then exit.

提交回复
热议问题