summaryrefslogtreecommitdiff
path: root/docs/application/memory.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-28 13:41:22 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-28 13:41:22 -0400
commitcf9285b1dbdf687630076149413f16e5d4af82e8 (patch)
tree7c10f7587cab9cd40c0d1b9e019cd4a2135e7193 /docs/application/memory.md
parent254059e2ea2df0cd63cf75d836ac9ebe00a28302 (diff)
type body object definitions and garbage collection algoHEADmain
Diffstat (limited to 'docs/application/memory.md')
-rw-r--r--docs/application/memory.md13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/application/memory.md b/docs/application/memory.md
index f5f457c..a8e75b8 100644
--- a/docs/application/memory.md
+++ b/docs/application/memory.md
@@ -45,12 +45,17 @@ typdef strcut _kpl_slab_tree_obj {
KPL_SLAB_TREE_HEADER(struct _kpl_slab_tree_obj);
} kpl_slab_tree_obj;
+typdef struct _kpl_slab_bucket {
+ struct _kpl_slab_bucket *next;
+ uint8_t byte_obj_array[];
+} kpl_slab_bucket;
+
typedef struct _kpl_slab {
- KPL_ALLOC_HEADER(struct _kpl_slab);
- uint32_t obj_size, byte_index;
+ uint16_t obj_count, obj_index;
+ uint32_t obj_size;
kpl_slab_obj *pool;
+ kpl_slab_bucket *bucket;
kpl_mutex mutex;
- uint8_t byte_array[];
} kpl_slab;
```
@@ -64,8 +69,6 @@ Each bucket in the `kpl_alloc.pool` represents two to the power of the bucket in
# Slab
-Allocated by `kpl_alloc`
-
## Pooling
Objects for reuse are stored as a list by the `kpl_slab_obj.prev` on `kpl_slab.pool`