Browse Source

memDesc: change ref as unsigned

master
Mathieu Maret 2 months ago
parent
commit
4a61d7f3b7
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      core/mem.c
  2. +1
    -1
      core/mem.h

+ 1
- 0
core/mem.c View File

@ -136,6 +136,7 @@ int unrefPhyPage(paddr_t addr)
if (!mem) {
return -1;
}
assert(mem->ref >0);
mem->ref--;
if (mem->ref == 0) {
allocatedPage--;


+ 1
- 1
core/mem.h View File

@ -11,7 +11,7 @@ extern uint32_t __ld_kernel_end;
struct memDesc {
paddr_t phy_addr;
long ref;
unsigned long ref;
struct memDesc *next, *prev;
};


Loading…
Cancel
Save