Module Name: src
Committed By: reinoud
Date: Tue Aug 23 18:37:51 UTC 2011
Modified Files:
src/sys/arch/usermode/usermode: pmap.c
Log Message:
Give malloc(3) a barrier to allocate OVER... i.e. let the space at ease!
Note that it could use an extra barrier too.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/usermode/usermode/pmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.24 src/sys/arch/usermode/usermode/pmap.c:1.25
--- src/sys/arch/usermode/usermode/pmap.c:1.24 Tue Aug 23 16:16:26 2011
+++ src/sys/arch/usermode/usermode/pmap.c Tue Aug 23 18:37:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.24 2011/08/23 16:16:26 jmcneill Exp $ */
+/* $NetBSD: pmap.c,v 1.25 2011/08/23 18:37:51 reinoud Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.24 2011/08/23 16:16:26 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.25 2011/08/23 18:37:51 reinoud Exp $");
#include "opt_memsize.h"
#include "opt_kmempages.h"
@@ -159,6 +159,15 @@
kmem_user_end = kmem_user_start + 1024 * MEMSIZE;
/* TODO make a better user space size estimate */
+ /* claim dummy space over all we need just to make fun of sbrk */
+ addr = thunk_mmap((void*) kmem_data_end,
+ kmem_user_end - kmem_data_end,
+ PROT_NONE,
+ MAP_ANON | MAP_FIXED,
+ -1, 0);
+ if (addr != (void *) kmem_data_end)
+ panic("pmap_bootstrap: protection barrier failed\n");
+
if (kmem_user_end < kmem_user_start)
panic("pmap_bootstrap: to small memorysize specified");