Re: Memory issues



On 2008-03-30 00:13, Joost Diepenmaat <joost@xxxxxxxxx> wrote:
jm <jm@xxxxxxxxx> writes:
Modifying a little bit again the script, and checking execution with
ltrace, I observed malloc is called 1871 times when free is just called
922 times.
Isn't it an issue?

Please keep in mind that perl's memory allocation strategy in general is
optimized for longer running programs, not for one-off scripts (which
makes sense, since one-off scripts don't usually need the performance
gains).

Or maybe it is optimized for one-off scripts? One-off scripts rarely
need to worry about hogging memory and it is certainly faster to let the
OS free all the memory at once than to call free a gazillion times.

hp
.



Relevant Pages

  • Re: Load Python Scripts from Memory
    ... > script/module from memory. ... > am building for scripts to be downloaded from a web site and run ... > (these can be pre-compiled scripts). ... stuff in memory from a "resource file", ...
    (comp.lang.python)
  • Re: I am pretty sure this isnt a FP problem but maybe someone can
    ... You just may want to check the scripts as they ... I would have them track your memory usage along ... of an hacker attack and this is the latest response I ... depth knowledge of all the scripts used on your website. ...
    (microsoft.public.frontpage.client)
  • Re: matlab speed issues
    ... windows, then creating and reusing one figure window would probably help. ... Although I've used the same function twice, the same memory space can't be used - the memory gets repeatedly fragmented. ... Although I'm told that functions are faster than scripts, they also seem to create other problems wrt fragmentation. ...
    (comp.soft-sys.matlab)
  • Re: Resource Leak from XslCompiledTransform
    ... The memory leaks in XSLT with scripts are not yet fixed in .net 2.0. ... keep its memory consumption at a reasonable level. ... replace the old XslTransform class, which looks lightweight and easier to ...
    (microsoft.public.dotnet.xml)
  • Re: mod_perl 1.99 apache 2.0.48
    ... > I did not modify my perl scripts in order to use mod_perl, ... references leaks memory. ... All sorts of things you do in Perl that should not leak memory do anyway. ...
    (comp.lang.perl.misc)