in reply to Re: Why is the size even bigger after pack?
in thread Why is the size even bigger after pack?

In the case of the IV, the greyed-out bits represent memory that doesn't actually exist. The IV value is actually stored in the svu_pv slot in the head, and the sv_any pointer in the head actually points back to itself (with a slight offset), so that it appears to be pointing to a struct whose fourth field is an xiv_iv. In this way only a head and not a body needs allocating, but all the perl functions which expect to find it as the fourth field of the body still work.

Dave.

  • Comment on Re^2: Why is the size even bigger after pack?

Replies are listed 'Best First'.
Re^3: Why is the size even bigger after pack?
by ikegami (Patriarch) on Nov 03, 2011 at 17:38 UTC

    The IV value is actually stored in the svu_pv slot in the head

    That's what I thought!

    Thanks for the explanation, that clears up a lot. What doesn't illguts mention any of this!?