Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/jemalloc/src/extent_mmap.c
Show All 15 Lines | |||||
#endif | #endif | ||||
; | ; | ||||
/******************************************************************************/ | /******************************************************************************/ | ||||
void * | void * | ||||
extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero, | extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero, | ||||
bool *commit) { | bool *commit) { | ||||
void *ret = pages_map(new_addr, size, ALIGNMENT_CEILING(alignment, | assert(alignment == ALIGNMENT_CEILING(alignment, PAGE)); | ||||
PAGE), commit); | void *ret = pages_map(new_addr, size, alignment, commit); | ||||
if (ret == NULL) { | if (ret == NULL) { | ||||
return NULL; | return NULL; | ||||
} | } | ||||
assert(ret != NULL); | assert(ret != NULL); | ||||
if (*commit) { | if (*commit) { | ||||
*zero = true; | *zero = true; | ||||
} | } | ||||
return ret; | return ret; | ||||
Show All 9 Lines |