diff options
Diffstat (limited to 'sys/vm/vm_physmem.c')
-rw-r--r-- | sys/vm/vm_physmem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_physmem.c b/sys/vm/vm_physmem.c index b6e7347..f8caf9a 100644 --- a/sys/vm/vm_physmem.c +++ b/sys/vm/vm_physmem.c @@ -194,6 +194,8 @@ vm_alloc_frame(size_t count) ret = __vm_alloc_frame(count); } + pages_used += count; + pages_free -= count; spinlock_release(&lock); return ret; } @@ -209,6 +211,8 @@ vm_free_frame(uintptr_t base, size_t count) for (uintptr_t p = base; p < stop_at; p += DEFAULT_PAGESIZE) { clrbit(bitmap, p / DEFAULT_PAGESIZE); } + pages_used -= count; + pages_free += count; spinlock_release(&lock); } |