Changeset 567 for trunk/kernel/mm/khm.h
- Timestamp:
- Oct 5, 2018, 12:01:52 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/khm.h
r457 r567 1 1 /* 2 * khm.h - kernel heap manager used for variable size memory allocation.2 * khm.h - Kernel Heap Manager definition. 3 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 * Mohamed Lamine Karaoui (2015) 6 * Alain Greiner (2016) 5 * Alain Greiner (2016,2017,2018) 7 6 * 8 7 * Copyright (c) UPMC Sorbonne Universites … … 29 28 #include <kernel_config.h> 30 29 #include <hal_kernel_types.h> 31 #include < spinlock.h>30 #include <busylock.h> 32 31 33 32 /******************************************************************************************* 34 33 * This structure defines a Kernel Heap Manager (KHM) in a given cluster. 35 * It is used to allocate memory objects, that are not 36 * enough replicated to justifya dedicated KCM allocator.34 * It is used to allocate memory objects, that are not enough replicated to justify 35 * a dedicated KCM allocator. 37 36 ******************************************************************************************/ 38 37 39 38 typedef struct khm_s 40 39 { 41 spinlock_t lock; /*! lock protecting exclusive access to heap*/40 busylock_t lock; /*! lock protecting KHM allocator */ 42 41 intptr_t base; /*! heap base address */ 43 42 uint32_t size; /*! heap size (bytes) */ … … 54 53 typedef struct khm_block_s 55 54 { 56 uint32_t busy :1;/*! free block if zero */57 uint32_t size :31; /*! size coded on 31 bits*/55 uint32_t busy; /*! free block if zero */ 56 uint32_t size; /*! block size */ 58 57 } 59 58 khm_block_t;
Note: See TracChangeset
for help on using the changeset viewer.