git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix leakage on mid-level page table when freeing vms
[lunaix-os.git]
/
lunaix-os
/
scripts
/
gdb
/
lunadbg
/
structs
/
page.py
diff --git
a/lunaix-os/scripts/gdb/lunadbg/structs/page.py
b/lunaix-os/scripts/gdb/lunadbg/structs/page.py
index 6dc5bf98ff46236cd92f85ceae79895624a3a275..cbb17f5079f8d2143378a9072549df8d67e3ba3c 100644
(file)
--- a/
lunaix-os/scripts/gdb/lunadbg/structs/page.py
+++ b/
lunaix-os/scripts/gdb/lunadbg/structs/page.py
@@
-9,6
+9,7
@@
class PageStruct(KernelStruct):
self.flags = self._kstruct["flags"]
self.order = self._kstruct["order"]
self.pool = self._kstruct["pool"]
self.flags = self._kstruct["flags"]
self.order = self._kstruct["order"]
self.pool = self._kstruct["pool"]
+ self.companion = self._kstruct["companion"]
def uninitialized(self):
return not (self.flags & 0b10)
def uninitialized(self):
return not (self.flags & 0b10)
@@
-20,8
+21,12
@@
class PageStruct(KernelStruct):
def busy(self):
return (not self.uninitialized()
def busy(self):
return (not self.uninitialized()
+ and self.type != 0b1000
and self.ref > 0)
and self.ref > 0)
+ def lead_page(self):
+ return self.companion == 0 and not self.uninitialized()
+
@staticmethod
def get_type() -> Type:
return lookup_type("struct ppage").pointer()
@staticmethod
def get_type() -> Type:
return lookup_type("struct ppage").pointer()