minix/servers/vm/phys_region.h
Ben Gras 7421728360 VM: memtype fix
Memory types in VM are described by methods. Each mapped region has
a type, and all pages instantiated get that type on creation.
Individual page types has to be able to change though. This commit
changes the code to use the memory types of the individual pages,
where appropriate, instead of just the higher-level region, in case
it has changed. This is needed to e.g. support future copy-on-write
MAP_PRIVATE mmap modes.

Change-Id: I5523db14ac036ec774a54392fb67f9acb8725731
2013-04-24 10:18:15 +00:00

24 lines
527 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
/* what kind of memory is it? */
mem_type_t *memtype;
/* list of phys_regions that reference the same phys_block */
struct phys_region *next_ph_list;
} phys_region_t;
#endif