summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_vmem.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2013-08-13 22:40:43 +0000
committerjeff <jeff@FreeBSD.org>2013-08-13 22:40:43 +0000
commitd330a11545fdd7f4f3a76b565f3a6ef0afe404e4 (patch)
tree09c45cbc7188677f718f5cb4ad44fc0f0b15bb09 /sys/kern/subr_vmem.c
parent20df47e8777c5ad65596edefc77ae78f58e54253 (diff)
downloadFreeBSD-src-d330a11545fdd7f4f3a76b565f3a6ef0afe404e4.zip
FreeBSD-src-d330a11545fdd7f4f3a76b565f3a6ef0afe404e4.tar.gz
- Add a statically allocated memguard arena since it is needed very early
on. - Pass the appropriate flags to vmem_xalloc() when allocating space for the arena from kmem_arena. Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/kern/subr_vmem.c')
-rw-r--r--sys/kern/subr_vmem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c
index d3a758d..cff28b7 100644
--- a/sys/kern/subr_vmem.c
+++ b/sys/kern/subr_vmem.c
@@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$");
#include <sys/taskqueue.h>
#include <sys/vmem.h>
+#include "opt_vm.h"
+
#include <vm/uma.h>
#include <vm/vm.h>
#include <vm/pmap.h>
@@ -223,6 +225,11 @@ vmem_t *kmem_arena = &kmem_arena_storage;
vmem_t *buffer_arena = &buffer_arena_storage;
vmem_t *transient_arena = &transient_arena_storage;
+#ifdef DEBUG_MEMGUARD
+static struct vmem memguard_arena_storage;
+vmem_t *memguard_arena = &memguard_arena_storage;
+#endif
+
/*
* Fill the vmem's boundary tag cache. We guarantee that boundary tag
* allocation will not fail once bt_fill() passes. To do so we cache
OpenPOWER on IntegriCloud