[Top][All Lists]

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

Re: malloc and alignment

From: Stefan Monnier
Subject: Re: malloc and alignment
Date: Mon, 16 Jun 2003 11:59:37 -0400

> > I'd like to try and get rid of the markbit on Lisp_Object values.
> > The idea is to scrape off a few more bits (I'd like to bump maxint
> > to 512MB instead of 128MB).  And I'd also like to represent floats
> > in 8bytes rather than 12.
> If you are scraping off bits, why not instead _add_ one, but reserve
> _all_ the additional tag values gained in that way for representing
> integers?

Oh, I also forgot to mention that integers currently have 3bit
of tag and 1bit of markbit, just like the rest and without getting
rid of the markbit (what I'm trying to do), you can't go below a
total of 2bits eaten (1bit of markbit and 1bit of tag).

By getting rid of the markbit, we get the current count on integers
down to 3bits eaten.  We can trivially reduce it further because
only 7 of the 8 tag values are currently used, so we can allocate
the 8th one to int as well, so we are down to 2bit of tags
for ints with only trivial changes to the code.  That's where
my 512MB number comes from.

To bump it up to 1GB, we'd need to indeed extend the tag size on
non-integers somewhat, which might not be that difficult, by
the way, but we'll see about that later.

BTW, someone on the XEmacs list recently complained that he had trouble
opening a 755MB file.  XEmacs supposedly handles up to 1GB buffers,
but his Emacs process went up to 2.1GB (Mule begins by allocating
a destination area of 1510MB because latin-1 has a max-expansion factor
of 2), so I think that a 512MB limit due to integers might not be that bad,
since bumping it to 1GB will just replace this limit with others.


reply via email to

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