From: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
Subject: Re: xquake binary update
Date: 1997/09/24 [thread overview]
Message-ID: <u4g1qun9ox.fsf@md.dent.med.uni-muenchen.de> (raw)
In-Reply-To: 6066sh$s6g$1@palladium.transmeta.com
torvalds@transmeta.com (Linus Torvalds) writes:
> The problem was due to the newer 'malloc()' implementation that no
> longer allocated contiguous memory (it uses anonymous mmap() for large
> memory allocations). Quake uses some 32-bit offsets internally, and the
> offsets between different allocations no longer fit into 32 bits with
> the new malloc.
This is true, probably because the kernel picks addresses far away
from the `conventional' heap for anonymous mmap(0, ...). I guess no
application should depend on small offsets for 64bit systems.
Please take note that a quick solution for this kind of problem
(without compiling a new binary) is to disable the use of mmap() in
the allocator by setting the environment variable
`MALLOC_MMAP_MAX_=0'. This works on any recent GNU libc-2 (and also
with Linux libc-5.4.x), and is IMHO _much_ preferable to preloading
another libc or malloc.
The same holds for buggy applications that e.g. free() a pointer twice
in a row -- in many cases this can be caught by setting
`MALLOC_CHECK_=1' (at some performance cost; please do fix the
applications in the long run).
I hope this helps preventing some panic and embarassment in the
future...
Regards,
Wolfram.
next prev parent reply other threads:[~1997-09-24 4:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-22 4:00 xquake binary update Linus Torvalds
1997-09-23 4:00 ` Alex Butcher
1997-09-24 4:00 ` Wolfram Gloger [this message]
[not found] <6066sh$s6g$1@palladium.transmeta.com >
1997-09-22 4:00 ` Chris Adams
1997-09-23 4:00 ` Andrew Kieschnick
1997-10-03 4:00 ` Andreas Trottmann
1997-10-11 4:00 ` Azira
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox