Return-Path: <jhawk@MIT.EDU>
Received: from central-city-carrier-station.mit.edu by po11.mit.edu (8.9.2/4.7) id QAA12681; Mon, 29 Jul 2002 16:10:28 -0400 (EDT)
Received: from manawatu-mail-centre.mit.edu (MANAWATU-MAIL-CENTRE.MIT.EDU [18.7.7.71])
	by central-city-carrier-station.mit.edu (8.9.2/8.9.2) with ESMTP id QAA20607;
	Mon, 29 Jul 2002 16:09:34 -0400 (EDT)
Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73])
	by manawatu-mail-centre.mit.edu (8.9.2/8.9.2) with ESMTP id QAA08063;
	Mon, 29 Jul 2002 16:09:33 -0400 (EDT)
Received: (from jhawk@localhost) by multics.mit.edu (8.9.3)
	id QAA10133; Mon, 29 Jul 2002 16:09:33 -0400 (EDT)
Date: Mon, 29 Jul 2002 16:09:33 -0400
From: John Hawkinson <jhawk@MIT.EDU>
To: "Hardy.Charles" <Hardy.Charles@MicroLinear.com>
Cc: "'sipb@mit.edu'" <sipb@MIT.EDU>
Subject: Re: Emacs--Maximum Buffer Size Exceeded
Message-ID: <20020729200933.GV22363@multics.mit.edu>
References: <95468EB2E8A3254FA21582FB3F443AB51385F4@kanab.microlinear.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <95468EB2E8A3254FA21582FB3F443AB51385F4@kanab.microlinear.com>
User-Agent: Mutt/1.4i

Hardy.Charles <Hardy.Charles@MicroLinear.com> wrote on Mon, 29 Jul
2002 at 12:55:42 -0700 in
<95468EB2E8A3254FA21582FB3F443AB51385F4@kanab.microlinear.com>:


Hmm, a blast from the past.

> I'm hoping you can point me in the right direction.  We are using GNU Emacs
> 20.4.1.  It will not open very large files (300 megabytes).  Attempting to
> open such a file results in the message: "Maximum buffer size exceeded".
> 
> I've found in the Emacs docs the following under the FAQ page, under
> "Problems with very large files" the following info:
> 
> 	As of version 19.29, the
> 	maximum buffer size is at least 2^27-1, or 134,217,727 bytes, or 132
> 	MBytes.  Emacs 20 can be compiled on some 64-bit systems in a way
> that
> 	enlarges the buffer size up to 576,460,752,303,423,487 bytes, or
> 	549,755,813 GBytes.
> 
> However, I have not been able to locate any information on how to actually
> go about compiling emacs in this way so as to enlarge the buffer size.

A lot depends on the architecture you're using. If you're
using such a 64-bit architecture, hopefully it happens automagically.
In some case you might have to take some special steps. For instance,
in emacs 21, etc/MACHINES says:

Sun 3, Sun 4 (sparc), Sun 386 (m68k-sun-sunos, sparc-sun-sunos, i386-sun-sunos,
                               sparc-sun-sunos4.1.3noshr, sparc-sun-solaris2.*,
                               i386-sun-solaris2.*, sparc*-*-linux-gnu)

  To build a 64-bit Emacs (with larger maximum buffer size and
  including large file support) on a Solaris system which supports
  64-bit executables, use the Sun compiler, configuring something like
  this (see the cc documentation for information on 64-bit
  compilation):  env CC="cc -xarch=v9" ./configure
...

> Can you tell me how to do this, or point to where I may find that
> information?

If you're not on a 64-bit machine, you are likely out of luck.
You might look at the use of VALBITS in src/lisp.h, and architecture-specific
modifications in src/m/*.

Good luck.

--jhawk
