- 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:
stefan 2010-08-09 17:55:05 +00:00
parent a3c5f8f5b8
commit 5c5b6da768

View file

@ -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);