-
Notifications
You must be signed in to change notification settings - Fork 6
silentbicycle/mpool
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A memory pool allocator, designed for systems that need to allocate/free pointers in amortized O(1) time. Memory is allocated a page at a time, then added to a set of pools of equally sized regions. A free list for each size is maintained in the unused regions. When a pointer is repooled, it is put at the head of the appropriate free list. Allocations larger than mp->max_pool (configurable, usually over 2048 bytes) are allocated whole via mmap and freed immediately via munmap; no free list is used. For example usage, see test.c.
About
memory pool allocator
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published