[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: maximum buffer size exceeded
From: |
Kim F. Storm |
Subject: |
Re: maximum buffer size exceeded |
Date: |
Wed, 05 Sep 2007 14:37:14 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
> I think the current view in Emacs development is that 64-bit platforms
> solve this problem so easily that its solution for 32-bit machines is
> much less important than working on other Emacs features.
Actually, I think a small trick could increase the buffer size to 1 GB
on 32 bit machines at the cost of a little(?) wasted memory.
[Note: Assuming USE_LSB_TAG is defined]
Currently, we have the lowest 3 bits reserved for the Lisp Type,
meaning that the largest positive Emacs integer is 2^28-1 (256MB).
Now, consider if we reserve 4 bits for the Lisp Type, but
in such a way the Lisp_Int == 0, while the other Lisp types
are odd numbers 1,3,5,7,...
In this setup, an integer can be recognized by looking at the lowest
bit alone (== 0), while the other Lisp types are recognized using the
current methods (looking at all 4 type bits).
The only drawback I can see is that Lisp_Objects have to be allocated
on 16 byte boundaries rather than the current 8 byte boundary, so a
little space may be wasted (and maybe not...).
I haven't tried this, but given that Lisp_Objects are usually accessed
via suitable macros, it looks quite doable.
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: maximum buffer size exceeded,
Kim F. Storm <=