in reply to Re: Re: cleaning up memory after closing files on MACOSX
in thread cleaning up memory after closing files on MACOSX
Clearly most of the memory allocated will be in contiguous blocks, and could be reclaimed by the OS, but if you watch top you'll see that almost none ever is.#!/usr/bin/perl use constant SLEEP => 20; warn "Starting\n"; my @arr = (1..1_000_000); warn "Allocated\n"; sleep(SLEEP); undef @arr; warn "Freed.\n"; sleep(SLEEP);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: cleaning up memory after closing files on MACOSX
by waswas-fng (Curate) on Aug 28, 2003 at 16:29 UTC |