disable gpu to alloc dma mem

This commit is contained in:
杜坤明
2010-12-31 14:26:22 +08:00
parent c6cb47e2a0
commit 9d802f11f0

View File

@@ -42,7 +42,8 @@
#define _GC_OBJ_ZONE gcvZONE_OS
#define PAGE_ALLOC_LIMIT 1 // <20><><EFBFBD><EFBFBD>Page<67><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define PAGE_ALLOC_LIMIT 1 // <20><><EFBFBD><EFBFBD>Page<67><65><EFBFBD><EFBFBD>
#define PAGE_ALLOC_LIMIT_SIZE 0 // <20><><EFBFBD><EFBFBD>Page<67><65><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD>С,<2C><>λΪM
#if PAGE_ALLOC_LIMIT
int g_pages_alloced = 0;
@@ -2665,7 +2666,7 @@ gceSTATUS gckOS_AllocatePagedMemoryEx(
if (Contiguous)
{
#if PAGE_ALLOC_LIMIT
if((g_pages_alloced + numPages) > 256*32) {
if( (g_pages_alloced + numPages) > (256*PAGE_ALLOC_LIMIT_SIZE) ) {
//printk("full %d! \n", g_pages_alloced);
addr = NULL;
} else {
@@ -2674,7 +2675,7 @@ gceSTATUS gckOS_AllocatePagedMemoryEx(
g_pages_alloced += numPages;
//printk("alloc %d / %d \n", numPages, g_pages_alloced);
} else {
printk("gpu : alloc %d fail! (%d/8192)\n", numPages, g_pages_alloced);
printk("gpu : alloc %d fail! (%d/%d)\n", numPages, g_pages_alloced, (256*PAGE_ALLOC_LIMIT_SIZE) );
}
}
#else