mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-10 13:28:41 +03:00
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:
parent
43e5cd2671
commit
93797b8b86
5 changed files with 60 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue