[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mac OS X] a patch for binary compatibility issue.

From: Nozomu Ando
Subject: [Mac OS X] a patch for binary compatibility issue.
Date: Sun, 08 May 2005 02:54:20 +0900

Hello all,

The binary of current emacs on Mac OS X depends on internal
implementation of system library.  On Mac OS X 10.3, we cannot invoke
emacs which is unexec'ed on Mac OS X 10.2.8, because
malloc_default_zone()->size returns incorrect value
(in unexec_realloc()).

The attached patch solves this problem. Moreover, emacs compiled
on Mac OS X 10.3 works for me on Mac OS X 10.4.

It assumes that return value of malloc() is multiple of 16 and
assumes that emacs requires only it is multiple of 8 (even when

It also changes ptr_in_unexec_regions() for efficiency.

2005-05-08  Nozomu Ando  <address@hidden>

        * unexmacosx.c: Include assert.h.
        (MACOSX_MALLOC_MULT16): Define to 1 if not already defined.
        (unexec_malloc_header_t): Add typedef.
        (ptr_in_unexec_regions): Define if MACOSX_MALLOC_MULT16.
        (unexec_malloc): Add assert. Malloc with struct
        unexec_malloc_header and record size on it if !in_dumped_exec.
        (unexec_realloc): Add assert. Use recorded size if in_dumped_exec
        && old_ptr is malloc'ed before unexec. Record new_size if
        (unexec_free): Free with struct unexec_malloc_header.

Best Regards,
Nozomu Ando

Attachment: diff.unexmacosx.c.txt.gz
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]