allocArea: implement allocPhy failure case
This commit is contained in:
parent
7081fea36d
commit
55e709adb5
@ -49,7 +49,6 @@ int allocSetup(size_t sizeOfArea, vaddr_t *areaAddr, vaddr_t *descAddr, vaddr_t
|
||||
*descAddr = (vaddr_t)allocGetSlab(sizeof(struct slabDesc));
|
||||
assert(allocBookSlab(sizeof(struct slabEntry), PAGE_SIZE, TRUE, FALSE) == 0);
|
||||
*entryAddr = (vaddr_t)allocGetSlab(sizeof(struct slabEntry));
|
||||
printf("allocSetup for sizeOfArea %d\n", sizeOfArea);
|
||||
assert(allocBookSlab(sizeOfArea, PAGE_SIZE, TRUE, TRUE) == 0);
|
||||
*areaAddr = (vaddr_t)allocGetSlab(sizeOfArea);
|
||||
allocInitialized = TRUE;
|
||||
|
@ -112,10 +112,9 @@ vaddr_t areaBook(unsigned int nbPages, uint32_t flags)
|
||||
}
|
||||
}
|
||||
if (page == (paddr_t)NULL) {
|
||||
printf("Ooops\n");
|
||||
// TODO
|
||||
// assert(0);
|
||||
areaFree(allocated);
|
||||
restore_IRQs(irqFlags);
|
||||
|
||||
return (vaddr_t)NULL;
|
||||
}
|
||||
}
|
||||
@ -175,10 +174,9 @@ vaddr_t areaAlloc(unsigned int nbPages, uint32_t flags)
|
||||
}
|
||||
}
|
||||
if (page == (paddr_t)NULL) {
|
||||
printf("Ooops\n");
|
||||
// TODO
|
||||
// assert(0);
|
||||
areaFree(allocated->startAddr);
|
||||
restore_IRQs(irqFlags);
|
||||
|
||||
return (vaddr_t)NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user