aboutsummaryrefslogtreecommitdiff
path: root/mmalloc/mmalloc.h
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-07-11 07:36:27 +0000
committerFred Fish <fnf@specifix.com>1996-07-11 07:36:27 +0000
commit7f12eb53ca94589c030b562c362b6283f1b002e4 (patch)
treed3810c2fa648a90838bde9605a350c163c6d4346 /mmalloc/mmalloc.h
parent5db223e45fc7b60e04c4041dca02324a9841f8c7 (diff)
downloadgdb-7f12eb53ca94589c030b562c362b6283f1b002e4.zip
gdb-7f12eb53ca94589c030b562c362b6283f1b002e4.tar.gz
gdb-7f12eb53ca94589c030b562c362b6283f1b002e4.tar.bz2
* detach.c (mmalloc_detach): Fix bug in computation of negative
brk value. * mmcheck.c (mmcheckf): Renamed from mmcheck and new FORCE argument added. Replaced hack that always allowed checking routines to be installed and enforce restriction that they have to be installed prior to allocating any memory on the used heap or the FORCE argument has to be non-NULL. (mmcheck): New function that calls mmcheckf with FORCE set to zero, for backwards compatibility. * mmalloc.c (malloc): Store result in local variable before returning it. Makes debugging much easier at negligible cost. * mmalloc.h (mmcheckf): Declare. * attach.c (reuse): Call mmcheckf rather than mmcheck. * mmap-sup.c (__mmalloc_mmap_morecore): Improve to allow mmap to select a base mapping address if none is otherwise given. (mmalloc_findbase): New function that user can call to find an available mapping address of a given size.
Diffstat (limited to 'mmalloc/mmalloc.h')
-rw-r--r--mmalloc/mmalloc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/mmalloc/mmalloc.h b/mmalloc/mmalloc.h
index 8399876..34e3898 100644
--- a/mmalloc/mmalloc.h
+++ b/mmalloc/mmalloc.h
@@ -1,8 +1,12 @@
#ifndef MMALLOC_H
#define MMALLOC_H 1
+/* 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. */
+
#ifdef HAVE_STDDEF_H
-#include <stddef.h>
+# include <stddef.h>
#endif
#include "ansidecl.h"
@@ -36,6 +40,8 @@ extern PTR mvalloc PARAMS ((PTR, size_t));
extern int mmcheck PARAMS ((PTR, void (*) (void)));
+extern int mmcheckf PARAMS ((PTR, void (*) (void), int));
+
/* Pick up the current statistics. (see FIXME elsewhere) */
extern struct mstats mmstats PARAMS ((PTR));
@@ -50,4 +56,6 @@ extern PTR mmalloc_getkey PARAMS ((PTR, int));
extern int mmalloc_errno PARAMS ((PTR));
+extern int mmtrace PARAMS ((void));
+
#endif /* MMALLOC_H */