9 typedef struct mem_type
{
10 char *name
; /* human-readable name */
11 int (*ev_new
)(struct vir_region
*region
);
12 void (*ev_delete
)(struct vir_region
*region
);
13 int (*ev_reference
)(struct phys_region
*pr
);
14 int (*ev_unreference
)(struct phys_region
*pr
);
15 int (*ev_pagefault
)(struct vmproc
*vmp
, struct vir_region
*region
,
16 struct phys_region
*ph
, int write
);
17 int (*ev_resize
)(struct vmproc
*vmp
, struct vir_region
*vr
, vir_bytes len
);
18 int (*writable
)(struct phys_region
*pr
);
19 int (*ev_sanitycheck
)(struct phys_region
*pr
, char *file
, int line
);
20 int (*ev_copy
)(struct vir_region
*vr
, struct vir_region
*newvr
);
21 u32_t (*regionid
)(struct vir_region
*vr
);
22 int (*refcount
)(struct vir_region
*vr
);