in reply to Re: (tye)Re: Perl Memory Leak ??
in thread Perl Memory Leak ??
Why is memory not freed for a string 'foo' assignment, but is freed for a number asignment ?Because numbers are fixed length and so fit directly into the SV struct while strings are variable length and so are separately malloc()ed with a pointer stored in the SV struct.
I'm a bit surprised that it only grows by 4 bytes. It would be a bit interesting to make the string slightly longer and see how many bytes get added per iteration.
But if upgrading Perl just makes the problem go away, then someone probably already ran down this particular bug and so repeating their work probably isn't worthwhile.
Perhaps a long shot, but there was also a problem where certain types of temporary values were not free until a loop was exitted.
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re2: Perl Memory Leak ??
by eformat (Initiate) on Dec 06, 2001 at 14:19 UTC | |
by eformat (Initiate) on Dec 06, 2001 at 15:42 UTC |