Updated Memory Manager (markdown)

Garrett Berg 2015-03-11 14:17:44 -06:00
parent 7f2a467ea5
commit ad76fe540b
1 changed files with 13 additions and 14 deletions

@ -28,22 +28,21 @@ Memory is split up into 4 Allocation Tables. Every Allocation Table has a `ATB`
``` ```
These are known as `ATB_0` through `ATB_3` and have several C methods (i.e. functions and macros) to access their attributes. These include: These are known as `ATB_0` through `ATB_3` and have several C methods (i.e. functions and macros) to access their attributes. These include:
BLOCKS_PER_ATB -- The number of ATB's that fit in an Allocation Table - `BLOCKS_PER_ATB` -- The number of ATB's that fit in an Allocation Table
ATB_MASK_N -- Get the relevant bytes for ATB table N - `ATB_MASK_N` -- Get the relevant bytes for ATB table N
- `ATB_N_IS_FREE(a)` -- Determine whether table N is currently free
ATB_N_IS_FREE(a) -- Determine whether table N is currently free
**What do these do? Why are they useful???** **What do these do? Why are they useful???**
- BLOCK_SHIFT(block) - `BLOCK_SHIFT(block)`
- ATB_GET_KIND(block) - `ATB_GET_KIND(block)`
- ATB_ANY_TO_FREE(block) - `ATB_ANY_TO_FREE(block)`
- ATB_FREE_TO_HEAD(block) - `ATB_FREE_TO_HEAD(block)`
- ATB_FREE_TO_TAIL(block) - `ATB_FREE_TO_TAIL(block)`
- ATB_HEAD_TO_MARK(block) - `ATB_HEAD_TO_MARK(block)`
- ATB_MARK_TO_HEAD(block) - `ATB_MARK_TO_HEAD(block)`
- BLOCK_FROM_PTR(ptr) - `BLOCK_FROM_PTR(ptr)`
- PTR_FROM_BLOCK(block) - `PTR_FROM_BLOCK(block)`
- ATB_FROM_BLOCK(bl) - `ATB_FROM_BLOCK(bl)`
## Questions ## Questions
- Is there documentation for the above methods? I think that would help me understand what they do - Is there documentation for the above methods? I think that would help me understand what they do