minix/servers/vm/phys_region.h
Ben Gras d343041caa VM: make mapping types explicit
Introduce explicit abstractions for different mapping types,
handling the instantiation, forking, pagefaults and freeing of
anonymous memory, direct physical mappings, shared memory and
physically contiguous anonymous memory as separate types, making
region.c more generic.

Also some other genericification like merging the 3 munmap cases
into one.

COW and SMAP safemap code is still implicit in region.c.
2012-10-12 14:52:01 +02:00

26 lines
552 B
C

#ifndef PHYS_REGION_H
#define PHYS_REGION_H 1
#include <stddef.h>
#include "memtype.h"
typedef struct phys_region {
struct phys_block *ph;
struct vir_region *parent; /* vir_region or NULL if yielded */
vir_bytes offset; /* offset from start of vir region */
#if SANITYCHECKS
int written; /* written to pagetable */
#endif
mem_type_t *memtype;
/* list of phys_regions that reference the same phys_block */
struct phys_region *next_ph_list;
/* AVL fields */
struct phys_region *less, *greater;
int factor;
} phys_region_t;
#endif