- fix bug in memory counting
git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@54 315a16e6-25f9-4109-90ae-ca3045a26c18
This commit is contained in:
parent
a3c5f8f5b8
commit
5c5b6da768
1 changed files with 3 additions and 3 deletions
|
@ -171,10 +171,10 @@ next_try:
|
|||
page_set_mark(l);
|
||||
|
||||
alloc_start = i+j;
|
||||
atomic_int32_add(&total_allocated_pages, npages*PAGE_SIZE);
|
||||
atomic_int32_sub(&total_available_pages, npages*PAGE_SIZE);
|
||||
atomic_int32_add(&total_allocated_pages, npages);
|
||||
atomic_int32_sub(&total_available_pages, npages);
|
||||
if (task)
|
||||
atomic_int32_add(&(task->mem_usage), npages*PAGE_SIZE);
|
||||
atomic_int32_add(&(task->mem_usage), npages);
|
||||
oom:
|
||||
spinlock_unlock(&bitmap_lock);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue