memDesc: change ref as unsigned

This commit is contained in:
Mathieu Maret 2021-02-10 21:15:35 +01:00
parent ef78de447f
commit 4a61d7f3b7
2 changed files with 2 additions and 1 deletions

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

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;
};