Changeset 22508 in vbox for trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
- Timestamp:
- Aug 27, 2009 11:38:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
r22355 r22508 239 239 cPages = cb >> PAGE_SHIFT; 240 240 cOrder = CalcPowerOf2Order(cPages); 241 #if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32) 242 paPages = alloc_pages(GFP_DMA32, cOrder); 243 if (!paPages) 244 #endif 241 245 #ifdef RT_ARCH_AMD64 242 /** @todo check out if there is a correct way of getting memory below 4GB (physically). 243 * GFP_DMA32 is available since Linux 2.6.15 */ 244 paPages = alloc_pages(GFP_DMA, cOrder); 246 paPages = alloc_pages(GFP_DMA, cOrder); 245 247 #else 246 /** XXX Wrong: GFP_USER can return page frames above 4GB! */ 247 paPages = alloc_pages(GFP_USER, cOrder); 248 # if defined(CONFIG_X86_PAE) 249 /** GFP_USER can return page frames above 4GB on PAE systems => GFP_DMA? */ 250 # endif 251 paPages = alloc_pages(GFP_USER, cOrder); 248 252 #endif 249 253 if (paPages)
Note:
See TracChangeset
for help on using the changeset viewer.