1 //===-- MachVMMemory.h ------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // Created by Greg Clayton on 6/26/07.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_MACHVMMEMORY_H
14 #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_MACHVMMEMORY_H
18 #include <mach/mach.h>
24 nub_size_t
Read(task_t task
, nub_addr_t address
, void *data
,
25 nub_size_t data_count
);
26 nub_size_t
Write(task_t task
, nub_addr_t address
, const void *data
,
27 nub_size_t data_count
);
28 nub_size_t
PageSize(task_t task
);
29 nub_bool_t
GetMemoryRegionInfo(task_t task
, nub_addr_t address
,
30 DNBRegionInfo
*region_info
);
31 nub_bool_t
GetMemoryProfile(DNBProfileDataScanType scanType
, task_t task
,
32 struct task_basic_info ti
, cpu_type_t cputype
,
33 nub_process_t pid
, vm_statistics64_data_t
&vminfo
,
34 uint64_t &physical_memory
, uint64_t &anonymous
,
35 uint64_t &phys_footprint
, uint64_t &memory_cap
);
38 nub_size_t
MaxBytesLeftInPage(task_t task
, nub_addr_t addr
, nub_size_t count
);
40 nub_size_t
WriteRegion(task_t task
, const nub_addr_t address
,
41 const void *data
, const nub_size_t data_count
);
43 vm_size_t m_page_size
;
47 #endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_MACHVMMEMORY_H