emacs-devel
[Top][All Lists]
Advanced

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

USE_LSB_TAG


From: Stefan Monnier
Subject: USE_LSB_TAG
Date: 20 Jan 2004 23:53:32 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

I've just installed code that should make it possible to use low-bits for
tags, thus allowing the use of the whole address space for lisp data.

By default, things should work exactly as before, but if you define
USE_LSB_TAG, then the new tagging should be used.  Things to note:

- if you use a compiler other than gcc, you will need to provide
  a definition of DECL_ALIGN, otherwise USE_LSB_TAG will be ignored.
  Please add the relevant definition to src/s/*.h or src/m/*.h or
  src/lisp.h or post it here if you don't know where to put it.

- this will lead to errors if your malloc does not always return addresses
  that are multiple-of-8.

- please also define ENABLE_CHECKING when using this new code.
- scratch that: please always use ENABLE_CHECKING.

- the .gdbinit file has not been updated, so gdb commands like xtype and
  friends won't do the right thing.

- Also, please try it with the attached patch below to see if your system
  can be automatically selected to USE_LSB_TAG.  It seems that s/darwin.h
  can also set USE_LSB_TAG.  Tell me of other systems where USE_LSB_TAG
  can be set.  I'm especially interested to hear about systems where it
  would be really useful such as on Mac OS 9 or FreeBSD.

- tell me if it works.  Tell me if it doesn't.


        Stefan


--- lisp.h.~1.476.~     Tue Jan 20 23:29:29 2004
+++ lisp.h      Tue Jan 20 23:46:34 2004
@@ -291,6 +291,11 @@
 
 /***** Select the tagging scheme.  *****/
 
+/* Try to USE_LSB_TAG on systems where we know malloc returns multiple-of-8 */
+#if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__
+#define USE_LSB_TAG
+#endif
+
 /* First, try and define DECL_ALIGN(type,var) which declares a static
    variable VAR of type TYPE with the added requirement that it be
    TYPEBITS-aligned. */




reply via email to

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