MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zone_size

Function zone_size

app/redis-6.2.6/deps/jemalloc/src/zone.c:132–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 */
131
132static size_t
133zone_size(malloc_zone_t *zone, const void *ptr) {
134 /*
135 * There appear to be places within Darwin (such as setenv(3)) that
136 * cause calls to this function with pointers that *no* zone owns. If
137 * we knew that all pointers were owned by *some* zone, we could split
138 * our zone into two parts, and use one as the default allocator and
139 * the other as the default deallocator/reallocator. Since that will
140 * not work in practice, we must check all pointers to assure that they
141 * reside within a mapped extent before determining size.
142 */
143 return ivsalloc(tsdn_fetch(), ptr);
144}
145
146static void *
147zone_malloc(malloc_zone_t *zone, size_t size) {

Callers

nothing calls this directly

Calls 2

ivsallocFunction · 0.85
tsdn_fetchFunction · 0.85

Tested by

no test coverage detected