Changeset 540 for Whitix/branches/hybrid/memory
- Timestamp:
- 05/24/08 09:55:45 (6 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/hybrid/memory/pg_alloc.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/hybrid/memory/pg_alloc.c
r240 r540 31 31 #include <console.h> 32 32 #include <sections.h> 33 #include <module.h> 33 34 #include <panic.h> 34 35 … … 121 122 } 122 123 123 printf("Number of ISA DMA pages = %u, number available = %u\nNumber of normal memory pages = %u, number available = %u\n",isa.maxPages,isa.numPages,normal.maxPages,normal.numPages);124 KePrint("Number of ISA DMA pages = %u, number available = %u\nNumber of normal memory pages = %u, number available = %u\n",isa.maxPages,isa.numPages,normal.maxPages,normal.numPages); 124 125 allocatedBitmap=NULL; /* Can't reserve anymore */ 125 126 … … 154 155 return &pageArrayPtr[address >> 12]; 155 156 } 157 158 SYMBOL_EXPORT(PageGetStruct); 156 159 157 160 struct PhysPage* PageAlloc() … … 168 171 } 169 172 173 SYMBOL_EXPORT(PageAlloc); 174 170 175 struct PhysPage* PageAllocLow() 171 176 { … … 177 182 } 178 183 184 SYMBOL_EXPORT(PageAllocLow); 185 179 186 void PageListPutPage(struct PageStack* stack,struct PhysPage* page) 180 187 { … … 197 204 if (pagePfn >= (normal.maxPages+4096)) 198 205 { 199 printf("PageFree : illegal free\n");206 KePrint("PageFree : illegal free\n"); 200 207 return; 201 208 } … … 205 212 if (pagePfn >= isa.maxPages) 206 213 { 207 printf("PageFree : isa illegal free\n");214 KePrint("PageFree : isa illegal free\n"); 208 215 return; 209 216 } … … 212 219 } 213 220 } 221 222 SYMBOL_EXPORT(PageFree); 214 223 215 224 /* Used by bootup code to reserve an area of memory so it isn't added to the page stack */ … … 222 231 if (!allocatedBitmap) /* Err, someone's reserving memory after the bitmap's gone */ 223 232 { 224 printf("PageReserveArea: can't reserve memory!\n");233 KePrint("PageReserveArea: can't reserve memory!\n"); 225 234 MachineHalt(); 226 235 } … … 240 249 return &waitQueues[page->physAddr >> 22]; 241 250 } 251 252 SYMBOL_EXPORT(PageGetWaitQueue);