emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: immediate strings #2


From: Dmitry Antipov
Subject: Re: immediate strings #2
Date: Wed, 30 Nov 2011 09:37:01 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 11/29/2011 12:50 PM, Paul Eggert wrote:

There is a bit available in size (since it's always nonnegative)
but not in size_byte (since it ranges from -1 .. PTRDIFF_MAX
and is a ptrdiff_t, assuming a 32-bit host configured --with-wide-int
and assuming the memory-saving patch of Bug#9874).

This is in contrast with our current uses of mark bits (e.g.,
ARRAY_MARK_FLAG), which use bits that are otherwise unused, even if
a vector has its maximal size.

We can fairly easily get that bit back from size_byte by restricting
its range to (say) 0 .. PTRDIFF_MAX.

So this is a fairly minor glitch that can be fixed but is not yet
fixed in the current proposal.

It looks like I miss the point. For an immediate strings, we need
two extra bits - 1 for GC, 1 for string subtype, so the question is
simple: where to get them if both size and size_byte are ptrdiff_t?

Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]