X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=mmalloc%2Fmmprivate.h;h=e1faa512654fe84656fe1aa252a1789e7dd06b3a;hb=87b2eef27dffc11a99e6e0ccde5a3fe218fc4414;hp=6cf3ad5b6db21fc6176e4bdbcb2de6f36f421e7c;hpb=a34a08d6401b6b67c9d5d1260d816c8ea8b85558;p=ocaml-ancient.git diff --git a/mmalloc/mmprivate.h b/mmalloc/mmprivate.h index 6cf3ad5..e1faa51 100644 --- a/mmalloc/mmprivate.h +++ b/mmalloc/mmprivate.h @@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. #define MMALLOC_MAGIC "mmalloc" /* Mapped file magic number */ #define MMALLOC_MAGIC_SIZE 8 /* Size of magic number buf */ #define MMALLOC_VERSION 1 /* Current mmalloc version */ -#define MMALLOC_KEYS 1024 /* Keys for application use */ +#define MMALLOC_KEYS 16 /* Keys for application use */ /* The allocator divides the heap into blocks of fixed size; large requests receive one or more whole blocks, and small requests @@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. #define INT_BIT (CHAR_BIT * sizeof(int)) #define BLOCKLOG (INT_BIT > 16 ? 12 : 9) -#define BLOCKSIZE ((unsigned int) 1 << BLOCKLOG) +#define BLOCKSIZE ((size_t) 1L << BLOCKLOG) #define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) /* The difference between two pointers is a signed int. On machines where @@ -63,8 +63,8 @@ Boston, MA 02111-1307, USA. sign of the result is machine dependent for negative values, so force it to be treated as an unsigned int. */ -#define ADDR2UINT(addr) ((unsigned int) ((char *) (addr) - (char *) NULL)) -#define RESIDUAL(addr,bsize) ((unsigned int) (ADDR2UINT (addr) % (bsize))) +#define ADDR2UINT(addr) ((size_t) ((char *) (addr) - (char *) NULL)) +#define RESIDUAL(addr,bsize) ((size_t) (ADDR2UINT (addr) % (bsize))) /* Determine the amount of memory spanned by the initial heap table (not an absolute limit). */ @@ -191,7 +191,7 @@ struct mdesc FIXME: For mapped regions shared by more than one process, this needs to be maintained on a per-process basis. */ - PTR (*morecore) PARAMS ((struct mdesc *, int)); + PTR (*morecore) PARAMS ((struct mdesc *, size_t)); /* Pointer to the function that causes an abort when the memory checking features are activated. By default this is set to abort(), but can @@ -319,7 +319,7 @@ extern struct mdesc *__mmalloc_sbrk_init PARAMS ((void)); #if defined(HAVE_MMAP) -extern PTR __mmalloc_mmap_morecore PARAMS ((struct mdesc *, int)); +extern PTR __mmalloc_mmap_morecore PARAMS ((struct mdesc *, size_t)); #endif