follow-up reallocarr(ay) BSD implementations,

here OpenBSD malloc_conceal api. not much different of classic
malloc/calloc but content not to be dumped in core files.
This commit is contained in:
David CARLIER 2022-01-07 22:07:49 +00:00
parent 43e5cd2671
commit 93797b8b86
5 changed files with 60 additions and 0 deletions

View file

@ -98,6 +98,14 @@ int main(void) {
CHECK_BODY("calloc0",{
result = (mi_usable_size(mi_calloc(0,1000)) <= 16);
});
#if (MI_DEBUG==0)
CHECK_BODY("malloc_conceal",{
char* p = (char *)mi_malloc(24);
p[0] = 1;
mi_freezero(p, 24);
result = p[0] == 0;
});
#endif
// ---------------------------------------------------
// Extended