PMM -- Fix type for pointer to next block
This commit is contained in:
parent
82fbafc38e
commit
28916257f1
@ -4,15 +4,15 @@ uintptr_t *first = 0;
|
|||||||
|
|
||||||
void pmm_free(void *c)
|
void pmm_free(void *c)
|
||||||
{
|
{
|
||||||
c = (uintptr_t *)P2V(c);
|
c = (void *)P2V(c);
|
||||||
*(uintptr_t *)c = (uintptr_t)first;
|
*(uintptr_t **)c = first;
|
||||||
first = c;
|
first = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *pmm_alloc()
|
void *pmm_alloc()
|
||||||
{
|
{
|
||||||
void *c = first;
|
void *c = first;
|
||||||
first = (uintptr_t *)(c?*(uintptr_t *)c:0);
|
first = c?*(uintptr_t **)c:0;
|
||||||
c = (uintptr_t *)V2P(c);
|
c = (void *)V2P(c);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user