1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 02:40:50 +01:00

target: add page_size_kb property

Add a property to get the target's virtual memory page size in kB.
This commit is contained in:
Sergei Trofimov 2018-11-02 10:56:19 +00:00 committed by Marc Bonnici
parent 74444210e7
commit 85e0fb08fe

View File

@ -165,6 +165,12 @@ class Target(object):
def user(self):
return self.getenv('USER')
@property
@memoized
def page_size_kb(self):
cmd = "cat /proc/self/smaps | {0} grep KernelPageSize | {0} head -n 1 | {0} awk '{{ print $2 }}'"
return int(self.execute(cmd.format(self.busybox)))
@property
def conn(self):
if self._connections: