At 11:45 AM +0100 12/30/02, Leopold Toetsch wrote:
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.
We can't promote to a larger type, as that would require moving the PMC, and we've promised PMCs won't move. Otherwise I would. (And I don't want to go with an extra level of indirection for this, for speed reasons)

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?
Hysterical raisins, partially. The data pointer is supposed to point to the actual data, while the cache union has a cached converted version for fast later access.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk


Reply via email to