diff options
Diffstat (limited to 'docs/application/memory.md')
| -rw-r--r-- | docs/application/memory.md | 13 |
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` |
