[gnu.emacs.bug] >16meg looses

shep@ALLSPICE.LCS.MIT.EDU (Tim Shepard) (05/20/89)

I'm using emacs on a machine which has 32meg of physical memory and
over 200 megabytes of swapping space.  I've noticed that when an emacs
gets large (because I like using things like M-x tags-search on LARGE
programs), instead of giving me warnings about running out of memory,
it eventually just wedges or gets very confused.

I've read a little of alloc.c, malloc.c, and lisp.h and reproduced the
problem under gdb and it looks to me like emacs is loosing because
since VALBITS is 24, emacs is unable to hold a pointer to a lisp
object to anything outside of the low 16 megabytes of memory.  I
cannot find any check for this in malloc.c or alloc.c .  Maybe in
alloc.c a check should be placed after the calls to malloc to make
sure that

	(val + size) < (1<<VALBITS)

or something like that.

And/Or could you please maybe squeeze VALBITS up to 25 in some later
release of emacs?

			-Tim