mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00: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:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							74444210e7
						
					
				
				
					commit
					85e0fb08fe
				
			@@ -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:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user