From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: maximum buffer size exceeded Date: Wed, 05 Sep 2007 14:37:14 +0200 Message-ID: <873axt1e6d.fsf@kfs-lx.testafd.dk> References: <87ejhgdux0.fsf@lion.rapttech.com.au> <87veaqr5l2.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188995866 10161 80.91.229.12 (5 Sep 2007 12:37:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2007 12:37:46 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 05 14:37:45 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ISu8Y-0004Fy-LS for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Sep 2007 14:37:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISu8W-0005oL-QD for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Sep 2007 08:37:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ISu8F-0005lp-GQ for help-gnu-emacs@gnu.org; Wed, 05 Sep 2007 08:37:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ISu8E-0005kQ-JA for help-gnu-emacs@gnu.org; Wed, 05 Sep 2007 08:37:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISu8E-0005kC-AS for help-gnu-emacs@gnu.org; Wed, 05 Sep 2007 08:37:18 -0400 Original-Received: from mail-relay.sonofon.dk ([212.88.64.25]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1ISu8D-0002iZ-Pw for help-gnu-emacs@gnu.org; Wed, 05 Sep 2007 08:37:18 -0400 Original-Received: (qmail 10796 invoked from network); 5 Sep 2007 12:37:16 -0000 Original-Received: from unknown (HELO kfs-lx.testafd.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 5 Sep 2007 12:37:16 -0000 In-Reply-To: (Eli Zaretskii's message of "Tue\, 04 Sep 2007 23\:22\:10 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: FreeBSD 4.6-4.9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47231 gmane.emacs.devel:77856 Archived-At: Eli Zaretskii 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 http://www.cua.dk