pagetable lab initialized
This commit is contained in:
@ -7,7 +7,6 @@
|
||||
#include "memlayout.h"
|
||||
#include "spinlock.h"
|
||||
#include "riscv.h"
|
||||
#include "proc.h"
|
||||
#include "defs.h"
|
||||
|
||||
void freerange(void *pa_start, void *pa_end);
|
||||
@ -81,17 +80,3 @@ kalloc(void)
|
||||
memset((char*)r, 5, PGSIZE); // fill with junk
|
||||
return (void*)r;
|
||||
}
|
||||
|
||||
int
|
||||
freemem(void)
|
||||
{
|
||||
struct run* p = kmem.freelist;
|
||||
uint64 num = 0;
|
||||
while (p) {
|
||||
num += 1;
|
||||
p = p->next;
|
||||
}
|
||||
return num * PGSIZE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user