|
From: | Dmitry Antipov |
Subject: | Re: Proposal: immediate strings |
Date: | Thu, 31 May 2012 13:28:20 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 |
On 05/29/2012 07:24 PM, Paul Eggert wrote:
That one's clever, but doesn't it grow the size of "struct Lisp_String" by a word, due to the padding bytes after the gcmarkbit member? Why does gcmarkbit have to be in the same place for the two kinds of strings? If you could put gcmarkbit in different places in the different union members, you wouldn't need that padding.
IIUC this is the only possible layout which: 1) uses bitfields 2) not requires __attribute__((packed)) and 3) provides 16-bytes Lisp_String with 10 bytes for immediate data on 32-bit and 32-bytes Lisp_String with 22 bytes for immediate data on 64-bit. Dmitry
[Prev in Thread] | Current Thread | [Next in Thread] |