org chen schreef: > I read a large file into a hash table. This hash table is used only > once in the subroutine. I am very concern the memory usage, So I plan > to realse the memory after used the hash table. The way I used is: > > my %hash = (); > > #read the large file into the hash table > ... > > #release memory > %hash = (); > > Do you think this way will really release memory usage?
Define "release" (or rather "really release"). It can get marked as free in a Perl sense, but not (necessarily) be returned to the OS. So from the OS point of view it is still used by the perl process that (once) allocated it. This all depends on how your perl is compiled too, like with what memory manager. > By the way, I found the hash table use much more memory than the > array. Show us your code. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/