This is the next step in using a common PObj for Buffers/PMCs. The major change is: free_unused_pobjects is now the common header freeing function working on all Buffer & PMC headers.

Object specific destroying is done in free_unused_pobjects too. Washing memory for PMCs is still in add_free_pmc for performance reasons.

With this patch in place it would be not too complicate to use differently sized PMCs. For 32-bit systems a "simple" PMC could be as small as 16 byte (PObj + vtable), a "complex" PMC is 32 byte - our current PMC.

A "simple" PMC would be a typical scalar (num or int) without properties. Attaching properties to such a PMC would need promoting it to a "complex" PMC.

BTW: what is the reason, that PerlStrings are attached to the data member and not to cache.string_val? Caching int/num vals of strings?

leo

Reply via email to