in reply to Re^5: Techniques On Saving Memory
in thread Techniques On Saving Memory
I'm not sure why you need to increment the ref count. Could you explain the reason?
See the discussion in this thread at Re^6: Techniques On Saving Memory. Basically, if you take a smashed reference, perl doesn't know you have it, so by the time you get to unsmash it, the thing you took a reference too could have been GC'd. If the refcount was (optionally) increased when a smashed refence was taken, and decremented when it was unsmashed, it would appear like an ordinary reference had been taken and GCing would be delayed.
I still have doubts about how this would interact with other things, especially threads and shared vars, but if all that functionality was wrapped in a single place, it might at least allow the idea to be tested.
It's already possible to do all of that using bist a pieces from half a dozen existing modules, but it would be useful to get it all from one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Techniques On Saving Memory
by japhy (Canon) on Mar 10, 2005 at 17:37 UTC | |
by BrowserUk (Patriarch) on Mar 10, 2005 at 17:46 UTC | |
by japhy (Canon) on Mar 10, 2005 at 18:00 UTC | |
by BrowserUk (Patriarch) on Mar 10, 2005 at 18:18 UTC | |
by japhy (Canon) on Mar 10, 2005 at 18:33 UTC | |
| |
by diotalevi (Canon) on Mar 11, 2005 at 15:38 UTC | |
|