Cache the VM page size that we get from task_vm_info so we don't
authorJason Molenda <jmolenda@apple.com>
Sat, 6 Apr 2013 20:30:59 +0000 (20:30 +0000)
committerJason Molenda <jmolenda@apple.com>
Sat, 6 Apr 2013 20:30:59 +0000 (20:30 +0000)
re-fetch the value.

llvm-svn: 178962

lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp

index 0b47c63..c28a534 100644 (file)
@@ -43,7 +43,8 @@ MachVMMemory::PageSize(task_t task)
             if (kr == KERN_SUCCESS)
             {
                 DNBLogThreadedIf(LOG_TASK, "MachVMMemory::PageSize task_info returned page size of 0x%x", (int) vm_info.page_size);
-                return vm_info.page_size;
+                m_page_size = vm_info.page_size;
+                return m_page_size;
             }
             else
             {