Changeset 18 for trunk/kernel/mm/khm.h
- Timestamp:
- Jun 3, 2017, 4:42:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/khm.h
r14 r18 1 1 /* 2 2 * khm.h - kernel heap manager used for variable size memory allocation. 3 * 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 5 * Mohamed Lamine Karaoui (2015) … … 33 33 /******************************************************************************************* 34 34 * This structure defines a Kernel Heap Manager (KHM) in a given cluster. 35 * It is used to allocate memory objects, that are not 35 * It is used to allocate memory objects, that are not 36 36 * enough replicated to justify a dedicated KCM allocator. 37 37 ******************************************************************************************/ … … 48 48 /******************************************************************************************* 49 49 * This structure defines an allocated block descriptor for the KHM. 50 * This block descriptor is stored at the beginning of the allocated block. 50 * This block descriptor is stored at the beginning of the allocated block. 51 51 * The returned pointer is the allocated memory block base + block descriptor size. 52 52 ******************************************************************************************/ … … 56 56 uint32_t busy:1; /*! free block if zero */ 57 57 uint32_t size:31; /*! size coded on 31 bits */ 58 } 58 } 59 59 khm_block_t; 60 60 … … 62 62 /******************************************************************************************* 63 63 * This function initializes a KHM heap manager in a given cluster. 64 * It is used to allocate variable size memory objects, that are not 64 * It is used to allocate variable size memory objects, that are not 65 65 * enough replicated to justify a dedicated KCM allocator. 66 66 ******************************************************************************************* … … 72 72 73 73 /******************************************************************************************* 74 * This function allocates a memory block from the local KHM. 74 * This function allocates a memory block from the local KHM. 75 75 * The actual size of the allocated block is the requested size, plus the block descriptor 76 76 * size, rounded to a cache line size.
Note: See TracChangeset
for help on using the changeset viewer.