Pipes and swap disks takes a not insignificant amount of KVA, so therefore
it must be used in KVA calculation.
This commit is contained in:
parent
dad88a6ce6
commit
184de4483b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.113 2002/04/04 16:40:15 ragge Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.114 2002/06/06 12:28:44 ragge Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -33,6 +33,7 @@
|
|||
#include "opt_cputype.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
#include "opt_lockdebug.h"
|
||||
#include "opt_pipe.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -198,6 +199,17 @@ calc_kvmsize(vsize_t usrptsize)
|
|||
#define MAXLKMSIZ 0x100000 /* XXX */
|
||||
kvmsize += MAXLKMSIZ;
|
||||
#endif
|
||||
|
||||
/* The swapper uses many anon's, set an arbitrary size */
|
||||
#ifndef SWAPSIZE
|
||||
#define SWAPSIZE (200*1024*1024) /* Assume 200MB swap */
|
||||
#endif
|
||||
kvmsize += ((SWAPSIZE/PAGE_SIZE)*sizeof(struct vm_anon));
|
||||
|
||||
/* New pipes may steal some amount of memory. Calculate 10 pipes */
|
||||
#ifndef PIPE_SOCKETPAIR
|
||||
kvmsize += PIPE_DIRECT_CHUNK*10;
|
||||
#endif
|
||||
return kvmsize;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue