summaryrefslogtreecommitdiff
path: root/malloc/malloc.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-03-08 00:50:21 +0000
committerUlrich Drepper <drepper@redhat.com>2005-03-08 00:50:21 +0000
commit854278dff83a754f1d24a17c1c1068e8ebfe6195 (patch)
tree0b2c09f41fad4dfe99070c3df5caedf9718d72ae /malloc/malloc.h
parenta5a33449fb4b947c681968834b380cbc374018bb (diff)
* malloc/arena.c (ptmalloc_init): Recognize MALLOC_PERTURB_ and call
mallopt appropriately. * malloc/malloc.h: Define M_PERTURB. * malloc/malloc.c (perturb_byte): New variable. (alloc_perturb, free_perturb): New macros. (_int_malloc): Before returning, overwrite the memory if this is requested. (_int_free): Overwrite freed memory if requested. (mALLOPt): Handle M_PERTURB. * test-skeleton.c: Add call to mallopt with M_PERTURB command.
Diffstat (limited to 'malloc/malloc.h')
-rw-r--r--malloc/malloc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/malloc/malloc.h b/malloc/malloc.h
index 0f99e837c3..1340aa15bc 100644
--- a/malloc/malloc.h
+++ b/malloc/malloc.h
@@ -122,6 +122,7 @@ extern struct mallinfo mallinfo __MALLOC_P ((void));
#define M_MMAP_THRESHOLD -3
#define M_MMAP_MAX -4
#define M_CHECK_ACTION -5
+#define M_PERTURB -6
/* General SVID/XPG interface to tunable parameters. */
extern int mallopt __MALLOC_P ((int __param, int __val));