#ifdef MEMORYMAPPING

#define CMAP_LIST_SIZE 1024
#define PROC_LIST_SIZE 64
#define N_SECTIONS 64
#define N_PFN_SECTIONS 64
#define SEC_NAMLEN 15
#define MAX_LOCKED_PAGES 2048

struct cmap_list {
  struct cmap_list *link;
  caddr_t kva;
  char waslocked; };

struct proc_list {
  struct proc_list *flink;
  struct proc_list *blink;
  struct proc *proc;
  caddr_t virtaddr; };

struct section {
  char name[SEC_NAMLEN+1];
  struct proc_list proc_root;
  struct cmap_list *pages;
  struct proc *lock;
  int size; };

struct pfn_section {
  struct proc *proc;
  caddr_t virtaddr;
  int size; };

extern struct cmap_list section_cmaps[CMAP_LIST_SIZE];
extern struct proc_list section_procs[PROC_LIST_SIZE];
extern struct section sections[N_SECTIONS];
extern struct pfn_section pfn_sections[N_PFN_SECTIONS];

#endif
