Subject: bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime

From: Stefan Monnier <[email-masked]>
Date: Sat, 13 Aug 2011 15:19:05 -0400

> Probably.  That would keep me from having to get involved in the details of
> how _heapinfo works, and it would probably be less error prone.  So I would
> do something like the following:

> 1. Temporarily restore the pre-dump malloc state.
> 2. Call xrealloc, getting storage of the new size in the old heap.
> 3. Copy the contents into a temporary buffer, and then free the recently
> allocated storage in the old heap.
> 4. Restore the malloc state, call malloc, and then copy the contents of the
> temporary buffer into the just-acquired storage in the new heap.

> Is that what you had in mind?

No, I meant, during initialization of Emacs, make sure we get the old
_heapinfo state, so that malloc/realloc/... just works.

        Stefan