MapAllocator
Description
Allocator backing the map’s storage.
Parameters
| Name | Direction | Description |
|---|---|---|
m |
in | Map. |
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Debug.c:469:
// Report leaks for anything still in `live`.
if (MapAllocator(&self->live) && MapPairCount(&self->live) > 0) {
LOG_ERROR("DebugAllocator: {} live allocation(s) at deinit time:", (u64)MapPairCount(&self->live));
MapForeachPairPtr(&self->live, key_ptr, val_ptr) {- In
KvConfig.c:283:
char c;
while (StrIterPeek(&si, &c)) {
Str key = StrInit(MapAllocator(cfg));
Str value = StrInit(MapAllocator(cfg));
StrIter read_si;- In
KvConfig.c:284:
while (StrIterPeek(&si, &c)) {
Str key = StrInit(MapAllocator(cfg));
Str value = StrInit(MapAllocator(cfg));
StrIter read_si;- In
KvConfig.c:349:
}
lookup = StrInitFromCstr(key, ZstrLen(key), MapAllocator(cfg));
value = kvconfig_get_ptr_str(cfg, &lookup);
StrDeinit(&lookup);- In
KvConfig.c:359:
if (!value) {
return StrInit(MapAllocator(cfg));
}- In
KvConfig.c:362:
}
return StrInitFromCstr(StrBegin(value), StrLen(value), MapAllocator(cfg));
}- In
KvConfig.c:369:
if (!value) {
return StrInit(MapAllocator(cfg));
}- In
KvConfig.c:372:
}
return StrInitFromCstr(StrBegin(value), StrLen(value), MapAllocator(cfg));
}- In
Type.c:177:
MapValueCopyInit(&map) == (GenericCopyInit)zstr_init_clone &&
MapValueCopyDeinit(&map) == (GenericCopyDeinit)zstr_deinit &&
MapAllocator(&map) == ALLOCATOR_OF(&alloc);
MapDeinit(&map);
Last updated on