- add additional error checks
git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@404 315a16e6-25f9-4109-90ae-ca3045a26c18
This commit is contained in:
parent
180f370298
commit
67d772b7fb
1 changed files with 3 additions and 0 deletions
|
@ -185,6 +185,9 @@ static size_t task_get_pages(task_t* task, uint32_t npages)
|
|||
if (BUILTIN_EXPECT(!npages, 0))
|
||||
return ret;
|
||||
|
||||
if (BUILTIN_EXPECT(npages > total_available_pages, 0))
|
||||
return ret;
|
||||
|
||||
spinlock_lock(&bitmap_lock);
|
||||
i = alloc_start;
|
||||
next_try:
|
||||
|
|
Loading…
Add table
Reference in a new issue