unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Mac OS X] a patch for binary compatibility issue.
@ 2005-05-07 17:54 Nozomu Ando
  0 siblings, 0 replies; only message in thread
From: Nozomu Ando @ 2005-05-07 17:54 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-07 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-07 17:54 [Mac OS X] a patch for binary compatibility issue Nozomu Ando

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