The "aux" union contains either the reference count or the string capacity. The idea must be that shared strings are immutable so the capacity is not meaningful. Conversely, if the string is not shared, the reference count is not meaningful.
The outer "as" union either contains the 24 byte char array or the 24 byte (len + ptr + aux) heap string information.
Comments
The "aux" union contains either the reference count or the string capacity. The idea must be that shared strings are immutable so the capacity is not meaningful. Conversely, if the string is not shared, the reference count is not meaningful.
The outer "as" union either contains the 24 byte char array or the 24 byte (len + ptr + aux) heap string information.