aboutsummaryrefslogtreecommitdiffstats
path: root/system_cmds/gcore.tproj/vm.h
blob: b91278282e0b771dd7016271a05adba962007ede (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Copyright (c) 2016 Apple Inc.  All rights reserved.
 */

#include <mach/mach.h>
#include <mach/mach_port.h>
#include <mach/task.h>
#include <mach/mach_vm.h>
#include <stdbool.h>

#include "corefile.h"
#include "region.h"

#ifndef _VM_H
#define _VM_H

extern void setpageshift(void);
extern int pageshift_host;
extern int pageshift_app;

struct region;
struct regionhead;

extern void del_fileref_region(struct region *);
extern void del_zfod_region(struct region *);
extern void del_sparse_region(struct region *);
extern void del_vanilla_region(struct region *);

extern struct regionhead *build_region_list(task_t);
extern int walk_region_list(struct regionhead *, walk_region_cbfn_t, void *);
extern void del_region_list(struct regionhead *);

extern void print_memory_region_header(void);
extern void print_memory_region(const struct region *);
extern void print_one_memory_region(const struct region *);

extern walk_region_cbfn_t region_print_memory;
extern walk_region_cbfn_t region_write_memory;
extern walk_region_cbfn_t region_size_memory;

extern int is_tagged(task_t, mach_vm_offset_t, mach_vm_offset_t, unsigned);

#ifdef RDAR_23744374
extern bool is_actual_size(const task_t, const struct region *, mach_vm_size_t *);
#endif

#endif /* _VM_H */