mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
* 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.
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user