All SV memory management code now inside the PMCs
[email protected] (Nicholas Clark) Sat, 30 Apr 2005 20:35:47 +0100
| Newsgroups | perl.ponie.dev |
|---|---|
| Message-ID | <[email protected]> |
All the SV memory management code is now contained within the PMCs. The perl core code now has no knowledge of how different SV types get and free memory, or how their internal structure is laid out. This means that it's possible to change the internal structure of the different PMC types on a PMC by PMC basis. However, there's not yet much benefit in doing this, as all types larger than SvNULL need 3 or more integers of storage, which is more than fits in an plain PMC. To get further on restructuring PMC storage, either reference counting needs to be abolished in favour of stack walking, GC, and the parrot high priority DOD, or the SvFLAGS PMC implementation needs to be modified so that the simpler SV types (IV, NV and RV) only store their flags in the PMC's private flag space, and fake up full Perl 5 flags on demand. I'm not sure which is actually best to do first. The roadmap has moving string and number conversion code ahead of either of these, so I'll tackle that first. Nicholas Clark