MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / _mi_divide_up

Function _mi_divide_up

3rd/mimalloc-2.0.9/include/mimalloc-internal.h:281–284  ·  view source on GitHub ↗

Divide upwards: `s <= _mi_divide_up(s,d)*d < s+d`.

Source from the content-addressed store, hash-verified

279
280// Divide upwards: `s <= _mi_divide_up(s,d)*d < s+d`.
281static inline uintptr_t _mi_divide_up(uintptr_t size, size_t divider) {
282 mi_assert_internal(divider != 0);
283 return (divider == 0 ? size : ((size + divider - 1) / divider));
284}
285
286// Is memory zero initialized?
287static inline bool mi_mem_is_zero(void* p, size_t size) {

Callers 9

mi_memory_growFunction · 0.85
mi_region_block_countFunction · 0.85
mi_region_try_alloc_osFunction · 0.85
mi_segment_os_allocFunction · 0.85
mi_segment_allocFunction · 0.85
mi_block_count_of_sizeFunction · 0.85
mi_manage_os_memory_exFunction · 0.85
mi_reserve_os_memory_exFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected