1995-11-05 04:12:15 +01:00
|
|
|
#ifndef MMALLOC_H
|
|
|
|
#define MMALLOC_H 1
|
1992-04-01 21:49:00 +02:00
|
|
|
|
1996-07-11 09:36:27 +02:00
|
|
|
/* FIXME: If <stddef.h> doesn't exist, you'll need to do something
|
|
|
|
to define size_t before including this file. Like upgrading
|
|
|
|
to a system with an ANSI C environment. */
|
|
|
|
|
1995-11-05 09:15:15 +01:00
|
|
|
#ifdef HAVE_STDDEF_H
|
1996-07-11 09:36:27 +02:00
|
|
|
# include <stddef.h>
|
1992-04-01 21:49:00 +02:00
|
|
|
#endif
|
|
|
|
|
1995-11-05 04:12:15 +01:00
|
|
|
#include "ansidecl.h"
|
|
|
|
|
1992-04-01 21:49:00 +02:00
|
|
|
/* Allocate SIZE bytes of memory. */
|
|
|
|
|
|
|
|
extern PTR mmalloc PARAMS ((PTR, size_t));
|
|
|
|
|
|
|
|
/* Re-allocate the previously allocated block in PTR, making the new block
|
|
|
|
SIZE bytes long. */
|
|
|
|
|
|
|
|
extern PTR mrealloc PARAMS ((PTR, PTR, size_t));
|
|
|
|
|
|
|
|
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
|
|
|
|
|
|
|
|
extern PTR mcalloc PARAMS ((PTR, size_t, size_t));
|
|
|
|
|
|
|
|
/* Free a block allocated by `mmalloc', `mrealloc' or `mcalloc'. */
|
|
|
|
|
|
|
|
extern void mfree PARAMS ((PTR, PTR));
|
|
|
|
|
|
|
|
/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
|
|
|
|
|
|
|
|
extern PTR mmemalign PARAMS ((PTR, size_t, size_t));
|
|
|
|
|
|
|
|
/* Allocate SIZE bytes on a page boundary. */
|
|
|
|
|
|
|
|
extern PTR mvalloc PARAMS ((PTR, size_t));
|
|
|
|
|
|
|
|
/* Activate a standard collection of debugging hooks. */
|
|
|
|
|
|
|
|
extern int mmcheck PARAMS ((PTR, void (*) (void)));
|
|
|
|
|
1996-07-11 09:36:27 +02:00
|
|
|
extern int mmcheckf PARAMS ((PTR, void (*) (void), int));
|
|
|
|
|
1992-04-01 21:49:00 +02:00
|
|
|
/* Pick up the current statistics. (see FIXME elsewhere) */
|
|
|
|
|
|
|
|
extern struct mstats mmstats PARAMS ((PTR));
|
|
|
|
|
1995-11-05 04:12:15 +01:00
|
|
|
extern PTR mmalloc_attach PARAMS ((int, PTR));
|
1992-04-01 21:49:00 +02:00
|
|
|
|
1995-11-05 04:12:15 +01:00
|
|
|
extern PTR mmalloc_detach PARAMS ((PTR));
|
1992-04-01 21:49:00 +02:00
|
|
|
|
1995-11-05 04:12:15 +01:00
|
|
|
extern int mmalloc_setkey PARAMS ((PTR, int, PTR));
|
1992-04-01 21:49:00 +02:00
|
|
|
|
1995-11-05 04:12:15 +01:00
|
|
|
extern PTR mmalloc_getkey PARAMS ((PTR, int));
|
1992-04-01 21:49:00 +02:00
|
|
|
|
1995-11-05 04:12:15 +01:00
|
|
|
extern int mmalloc_errno PARAMS ((PTR));
|
1992-04-01 21:49:00 +02:00
|
|
|
|
1996-07-11 09:36:27 +02:00
|
|
|
extern int mmtrace PARAMS ((void));
|
|
|
|
|
1995-11-05 04:12:15 +01:00
|
|
|
#endif /* MMALLOC_H */
|