Changeset 18 for trunk/kernel/mm/ppm.h
- Timestamp:
- Jun 3, 2017, 4:42:49 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/ppm.h
r7 r18 1 1 /* 2 2 * ppm.h - Per-cluster Physical Pages Manager Interface 3 * 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 5 * Alain Greiner (2016) … … 39 39 * The segments kcode and kdata are mapped in the first "offset" pages. 40 40 * The physical page descriptors array is implemented just after this offset zone. 41 * The main service provided by the PMM is the dynamic allocation of physical pages. 42 * This low-level allocator implements the buddy algorithm: an allocated block is 41 * The main service provided by the PMM is the dynamic allocation of physical pages. 42 * This low-level allocator implements the buddy algorithm: an allocated block is 43 43 * is an integer number n of 4 Kbytes pages, and n (called order) is a power of 2. 44 44 ****************************************************************************************/ … … 62 62 * This function initializes a PPM (Physical Pages Manager) in a cluster. 63 63 * The physical memory base address in all clusters is zero. 64 * The physical memory size is NOT constrained to be smaller than 4 Gbytes. 64 * The physical memory size is NOT constrained to be smaller than 4 Gbytes. 65 65 ***************************************************************************************** 66 66 * @ ppm : pointer on physical pages manager. … … 68 68 * @ pages_offset : number of pages already allocated in this physical memory. 69 69 ****************************************************************************************/ 70 void ppm_init( ppm_t * ppm, 70 void ppm_init( ppm_t * ppm, 71 71 uint32_t pages_nr, 72 72 uint32_t pages_offset ); … … 75 75 * This is the low-level physical pages allocation function. 76 76 * It allocates N contiguous physical pages. N is a power of 2. 77 * In normal use, you don't need to call it directly, as the recomm anded way to get77 * In normal use, you don't need to call it directly, as the recommended way to get 78 78 * physical pages is to call the generic allocator defined in kmem.h. 79 79 ***************************************************************************************** … … 85 85 /***************************************************************************************** 86 86 * This is the low-level physical pages release function. 87 * In normal use, you do not need to call it directly, as the recomm anded way to free87 * In normal use, you do not need to call it directly, as the recommended way to free 88 88 * physical pages is to call the generic allocator defined in kmem.h. 89 89 *****************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.