Browse Source

memDesc: change ref as unsigned

master
Mathieu Maret 6 months ago
parent
commit
4a61d7f3b7
  1. 1
      core/mem.c
  2. 2
      core/mem.h

1
core/mem.c

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

2
core/mem.h

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