in reply to "benchmarking" memory usage

AFAIK Perl does not give back memory to the OS. So on Linux, if you put your code to benchmark in 2 different scripts, for each of them, just before exiting, you can get the memory used by your code in /proc/$$/status.

Replies are listed 'Best First'.
Re^2: "benchmarking" memory usage
by salva (Canon) on May 30, 2005 at 21:14 UTC
Re^2: "benchmarking" memory usage
by Fletch (Bishop) on May 31, 2005 at 14:08 UTC

    This came up recently, but depending on the OS and your malloc(3) implementation you may see your perl process size shrink when free(3) gets called or you might not. Might be interesting to see a table of $^O / $Config{usemymalloc} / "will my process shrink?" across some different combinations.

    --
    We're looking for people in ATL