![]() |
MOS Source Code
|
#include <mos/lib/structures/list.hpp>#include <mos/lib/sync/spinlock.hpp>#include <mos/string.hpp>#include <mos/string_view.hpp>#include <mos/type_utils.hpp>#include <stddef.h>Go to the source code of this file.
Classes | |
| struct | slab_t |
| struct | Slab< T > |
Namespaces | |
| namespace | mos |
Functions | |
| void | slab_init () |
| initialise the slab allocator | |
| void * | slab_alloc (size_t size) |
| Allocate a block of memory from the slab allocator. | |
| void * | slab_calloc (size_t nmemb, size_t size) |
| Allocate a block of memory from the slab allocator and zero it. | |
| void * | slab_realloc (void *addr, size_t size) |
| Reallocate a block of memory from the slab allocator. | |
| void | slab_free (const void *addr) |
| Free a block of memory from the slab allocator. | |
| void | slab_register (slab_t *slab) |
| void * | kmemcache_alloc (slab_t *slab) |
| void | kmemcache_free (slab_t *slab, const void *addr) |
| void slab_init | ( | ) |
initialise the slab allocator
Definition at line 112 of file slab.cpp.
Referenced by setup_sane_environment().
Allocate a block of memory from the slab allocator.
| size |
Definition at line 126 of file slab.cpp.
Referenced by slab_calloc(), and slab_realloc().
Free a block of memory from the slab allocator.
| addr |
Definition at line 196 of file slab.cpp.
Referenced by slab_realloc().
Definition at line 119 of file slab.cpp.
Referenced by Slab< T >::create().
Definition at line 216 of file slab.cpp.
Referenced by Slab< T >::create(), and slab_alloc().
Definition at line 242 of file slab.cpp.
Referenced by slab_free(), and slab_realloc().