PMM -- Fix type for pointer to next block

This commit is contained in:
thomas committed 2018-03-20 14:11:21 +01:00
1 parent 82fbafc38e
commit 28916257f1
1 file changed
+4 -4
+4 -4
View File
@@ -4,15 +4,15 @@ uintptr_t *first = 0;
void pmm_free(void *c)
{
c = (uintptr_t *)P2V(c);
*(uintptr_t *)c = (uintptr_t)first;
c = (void *)P2V(c);
*(uintptr_t **)c = first;
first = c;
}
void *pmm_alloc()
{
void *c = first;
first = (uintptr_t *)(c?*(uintptr_t *)c:0);
c = (uintptr_t *)V2P(c);
first = c?*(uintptr_t **)c:0;
c = (void *)V2P(c);
return c;
}