]> granicus.if.org Git - python/commitdiff
Documented (slightly) the USE_CACHE_ALIGNED define, for the standalone
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 29 May 1997 14:57:45 +0000 (14:57 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 29 May 1997 14:57:45 +0000 (14:57 +0000)
distribution

Mac/mwerks/malloc/README
Mac/mwerks/malloc/malloc.c

index 59c2af1df8e888ca6213418c300014bb219e4de9..56547e733d559f1ab1e9a0cc886f03bc147f1245 100644 (file)
@@ -6,7 +6,7 @@ implemented for use with the MetroWerks CodeWarrior compiler on the
 PowerPC Mac, but may also be useful (in a more limited way) for use
 with MW 68K or Think compilers.
 
-This is distribution 1.0, dated April 19, 1995.
+This is distribution 1.1, dated May 28, 1997.
 
                How does it work?
                -----------------
@@ -52,9 +52,13 @@ One reason for not using it:
   
                How do I use it?
                ----------------
+You may want to look at the source: most debugging options are off by
+default, and so is returning cache-aligned blocks. Near the top of
+malloc.c you will see a couple of defines you can turn on.
+
 For MW PPC: simply add the sources to your project. Due to the way the
 linker works all mallocs will use the new malloc, even the malloc
-calls that come from the libraries (if I'm informaed correctly).
+calls that come from the libraries.
 
 For MW 68K: ditto, only supposedly the library malloc calls will still
 use the original malloc. The two packages don't bite each other,
index 89ba4bf5b3e8b09cce403f36bf39b55d61114757..7d0fb6c6fe4119a200e5438627050a23b53a58fc 100644 (file)
@@ -61,6 +61,13 @@ static char *rcsid = "$Id$";
 #define VCHECK
 #endif /* USE_MALLOC_DEBUG */
 
+/* 
+ * Set the next define if you want to return memory that is aligned to 32-byte
+ * boundaries. This allows 604 (and, to a lesser extent, any PPC) programs to
+ * make better use of the L1 cache.
+ */
+/* #define USE_CACHE_ALIGNED 8 /* The alignment (in 4-byte words) */
+
 typedef unsigned char u_char;
 typedef unsigned long u_long;
 typedef unsigned int u_int;