unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nozomu Ando <nand@mac.com>
Subject: [Mac OS X] a patch for binary compatibility issue.
Date: Sun, 08 May 2005 02:54:20 +0900	[thread overview]
Message-ID: <86oebmdir7.fsf@almi.jk.homeunix.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

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
USE_LSB_TAG).

It also changes ptr_in_unexec_regions() for efficiency.

---
2005-05-08  Nozomu Ando  <nand@mac.com>

	* 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
	!in_dumped_exec.
	(unexec_free): Free with struct unexec_malloc_header.
---

Best Regards,
Nozomu Ando
---

[-- Attachment #2: diff.unexmacosx.c.txt.gz --]
[-- Type: application/octet-stream, Size: 1135 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

                 reply	other threads:[~2005-05-07 17:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86oebmdir7.fsf@almi.jk.homeunix.org \
    --to=nand@mac.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).