diff options
Diffstat (limited to 'Mac/mwerks/malloc')
-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; |