ProcMapsDeinit
Description
Release storage owned by a ProcMaps. Safe on a zeroed struct. Storage is reclaimed through each container’s inline allocator — no separate allocator argument is needed.
Success
Returns to the caller. *self is zeroed.
Failure
Function cannot fail. NULL self is a no-op.
Usage example (Cross-references)
Usage examples (Cross-references)
}
VecDeinit(&self->cache);
ProcMapsDeinit(&self->maps);
MemSet(self, 0, sizeof(*self));
}- In
ProcMaps.c:183:
if (!FileIsOpen(&f)) {
LOG_ERROR("ProcMapsLoad: FileOpen(/proc/self/maps) failed");
ProcMapsDeinit(out);
return false;
}- In
ProcMaps.c:195:
LOG_ERROR("ProcMapsLoad: failed to grow buffer");
FileClose(&f);
ProcMapsDeinit(out);
return false;
}- In
ProcMaps.c:202:
LOG_ERROR("ProcMapsLoad: FileRead failed");
FileClose(&f);
ProcMapsDeinit(out);
return false;
}- In
ProcMaps.c:217:
if (StrLen(&out->raw) == 0) {
LOG_ERROR("ProcMapsLoad: /proc/self/maps was empty");
ProcMapsDeinit(out);
return false;
}- In
ProcMaps.c:237:
}
if (!VecPushBackR(&out->entries, e)) {
ProcMapsDeinit(out);
return false;
}- In
ProcMaps.c:252:
}
void ProcMapsDeinit(ProcMaps *self) {
if (!self)
return; }
}
ProcMapsDeinit(&maps);
}
DefaultAllocatorDeinit(&a); bool pushed = VecPushBackR(&pm.entries, e0) && VecPushBackR(&pm.entries, e1) && VecPushBackR(&pm.entries, e2);
if (!pushed) {
ProcMapsDeinit(&pm);
DebugAllocatorDeinit(&alloc);
return false; ok = ok && h0 != NULL && h0->start == 0x1000 && h1 != NULL && h1->start == 0x3000;
ProcMapsDeinit(&pm);
DebugAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:36:
ok = ok && any_exec;
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:57:
bool ok = entry != NULL && (entry->perms & PROC_MAP_PERM_EXEC) != 0;
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:82:
bool ok = VecLen(&maps.entries) > 5;
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:108:
ok = ok && fn_addr >= e->start && fn_addr < e->end;
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:139:
(void)local;
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:179:
}
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:221:
}
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:246:
bool ok = e == NULL;
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:292:
}
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;- In
ProcMaps.c:323:
bool ok = during > before;
ProcMapsDeinit(&maps);
// After Deinit every load allocation is gone again.
- In
ProcMaps.c:356:
}
ProcMapsDeinit(&maps);
DefaultAllocatorDeinit(&alloc);
return ok;
Last updated on