Patch for large 64 bit allocations (Jason Ganetsky).
[ocaml-ancient.git] / mmalloc / mmalloc.h
1 #ifndef MMALLOC_H
2 #define MMALLOC_H 1
3
4 #ifdef HAVE_STDDEF_H
5 #  include <stddef.h>
6 #else
7 #  include <sys/types.h>   /* for size_t */
8 #  include <stdio.h>       /* for NULL */
9 #endif
10
11 #include "ansidecl.h"
12  
13 /* Allocate SIZE bytes of memory.  */
14
15 extern PTR mmalloc PARAMS ((PTR, size_t));
16
17 /* Re-allocate the previously allocated block in PTR, making the new block
18    SIZE bytes long.  */
19
20 extern PTR mrealloc PARAMS ((PTR, PTR, size_t));
21
22 /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0.  */
23
24 extern PTR mcalloc PARAMS ((PTR, size_t, size_t));
25
26 /* Free a block allocated by `mmalloc', `mrealloc' or `mcalloc'.  */
27
28 extern void mfree PARAMS ((PTR, PTR));
29
30 /* Allocate SIZE bytes allocated to ALIGNMENT bytes.  */
31
32 extern PTR mmemalign PARAMS ((PTR, size_t, size_t));
33
34 /* Allocate SIZE bytes on a page boundary.  */
35
36 extern PTR mvalloc PARAMS ((PTR, size_t));
37
38 /* Activate a standard collection of debugging hooks.  */
39
40 extern int mmcheck PARAMS ((PTR, void (*) (void)));
41
42 extern int mmcheckf PARAMS ((PTR, void (*) (void), int));
43
44 /* Pick up the current statistics. (see FIXME elsewhere) */
45
46 extern struct mstats mmstats PARAMS ((PTR));
47
48 extern PTR mmalloc_attach PARAMS ((int, PTR));
49
50 extern PTR mmalloc_detach PARAMS ((PTR));
51
52 extern int mmalloc_setkey PARAMS ((PTR, int, PTR));
53
54 extern PTR mmalloc_getkey PARAMS ((PTR, int));
55
56 extern int mmalloc_errno PARAMS ((PTR));
57
58 extern int mmtrace PARAMS ((void));
59
60 extern PTR mmalloc_findbase PARAMS ((size_t));
61
62 #endif  /* MMALLOC_H */