提交 22ed1efb 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

unused field

上级 b4432448
...@@ -49,7 +49,6 @@ struct vma : public range { ...@@ -49,7 +49,6 @@ struct vma : public range {
struct vmap { struct vmap {
struct crange cr; struct crange cr;
atomic<u64> ref; atomic<u64> ref;
u64 alloc;
pgmap *const pml4; // Page table pgmap *const pml4; // Page table
char *const kshared; char *const kshared;
......
...@@ -140,11 +140,8 @@ vma::~vma() ...@@ -140,11 +140,8 @@ vma::~vma()
*/ */
vmap::vmap() vmap::vmap()
: cr(10), pml4(setupkvm()), kshared((char*) ksalloc(slab_kshared)) : cr(10), ref(1), pml4(setupkvm()), kshared((char*) ksalloc(slab_kshared))
{ {
ref = 1;
alloc = 0;
if (pml4 == 0) { if (pml4 == 0) {
cprintf("vmap_alloc: setupkvm out of memory\n"); cprintf("vmap_alloc: setupkvm out of memory\n");
goto err; goto err;
...@@ -175,7 +172,6 @@ vmap::~vmap() ...@@ -175,7 +172,6 @@ vmap::~vmap()
ksfree(slab_kshared, kshared); ksfree(slab_kshared, kshared);
if (pml4) if (pml4)
freevm(pml4); freevm(pml4);
alloc = 0;
} }
void void
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论