- 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:
stefan 2011-02-10 12:58:28 +00:00
parent 180f370298
commit 67d772b7fb

View file

@ -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: