Skip to content
ProcMapsDeinit

ProcMapsDeinit

Description

Release storage owned by a ProcMaps. Safe on a zeroed struct.

Usage example (Cross-references)

Usage examples (Cross-references)
        ok = ok && any_exec;
    
        ProcMapsDeinit(&maps);
        DefaultAllocatorDeinit(&alloc);
        return ok;
        bool ok = entry != NULL && (entry->perms & PROC_MAP_PERM_EXEC) != 0;
    
        ProcMapsDeinit(&maps);
        DefaultAllocatorDeinit(&alloc);
        return ok;
        }
        VecDeinit(&self->cache);
        ProcMapsDeinit(&self->maps);
        MemSet(self, 0, sizeof(*self));
    }
        if (!f) {
            LOG_SYS_ERROR("ProcMapsLoad: fopen(/proc/self/maps) failed");
            ProcMapsDeinit(out);
            return false;
        }
                LOG_ERROR("ProcMapsLoad: failed to grow buffer");
                fclose(f);
                ProcMapsDeinit(out);
                return false;
            }
        if (out->raw.length == 0) {
            LOG_ERROR("ProcMapsLoad: /proc/self/maps was empty");
            ProcMapsDeinit(out);
            return false;
        }
            }
            if (!VecPushBackR(&out->entries, e)) {
                ProcMapsDeinit(out);
                return false;
            }
    }
    
    void ProcMapsDeinit(ProcMaps *self) {
        if (!self)
            return;
Last updated on