posix_memalign in calloc
This commit is contained in:
parent
3752821ab4
commit
93d484bb58
@ -156,9 +156,10 @@ void *calloc(size_t nmemb, size_t size) {
|
||||
k &= MAP_SIZE - 1;
|
||||
__lafl_alloc_map[k] = MAX(__lafl_alloc_map[k], size);
|
||||
|
||||
void *result = realloc(NULL, size);
|
||||
memset(result, 0, size);
|
||||
return result;
|
||||
void *ret = NULL;
|
||||
posix_memalign(&ret, 1<<6, size);
|
||||
memset(ret, 0, size);
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user