提交 879bf6db 创建 作者: Austin Clements's avatar Austin Clements

Comment zalloc and zfree since I always forget that they aren't a pair

上级 fe9d6c9d
...@@ -100,12 +100,15 @@ zallocator::free(void* p) ...@@ -100,12 +100,15 @@ zallocator::free(void* p)
kmem.free((struct run*)p); kmem.free((struct run*)p);
} }
// Allocate a zeroed page. This page can be freed with kfree or, if
// it is known to be zeroed when it is freed, zfree.
char* char*
zalloc(const char* name) zalloc(const char* name)
{ {
return z_->alloc(name); return z_->alloc(name);
} }
// Free a page that is known to be zero
void void
zfree(void* p) zfree(void* p)
{ {
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论