diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1997-05-29 14:57:45 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1997-05-29 14:57:45 (GMT) |
commit | 8d1ac0225cd18e05b694f51e29a1267c94e44147 (patch) | |
tree | de1dcfde7071cad0760c986dfe4f99fc29f41e7c | |
parent | e66b8c8543ea6dc3b3b660006e6339dc867b11ca (diff) | |
download | cpython-8d1ac0225cd18e05b694f51e29a1267c94e44147.zip cpython-8d1ac0225cd18e05b694f51e29a1267c94e44147.tar.gz cpython-8d1ac0225cd18e05b694f51e29a1267c94e44147.tar.bz2 |
Documented (slightly) the USE_CACHE_ALIGNED define, for the standalone
distribution
-rw-r--r-- | Mac/mwerks/malloc/README | 8 | ||||
-rw-r--r-- | Mac/mwerks/malloc/malloc.c | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/Mac/mwerks/malloc/README b/Mac/mwerks/malloc/README index 59c2af1..56547e7 100644 --- a/Mac/mwerks/malloc/README +++ b/Mac/mwerks/malloc/README @@ -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, diff --git a/Mac/mwerks/malloc/malloc.c b/Mac/mwerks/malloc/malloc.c index 89ba4bf..7d0fb6c 100644 --- a/Mac/mwerks/malloc/malloc.c +++ b/Mac/mwerks/malloc/malloc.c @@ -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; |