Added an additional flag B_OVERCOMMITTING_AREA (currently to be specified
along the protection flags). Changed the handling of B_STACK_AREA types and anonymous vm_areas: now every area can overcommit if B_OVERCOMMITTING_AREA was specified. B_STACK_AREA areas are still automatically overcommitting, but B_KERNEL_STACK_AREA areas no longer. vm_store_anonymous_noswap.c now only tests for guard pages if there were any specified which is only done for B_STACK_AREA areas. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12673 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, [email protected].
|
||||
/*
|
||||
* Copyright 2004-2005, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -8,8 +8,13 @@
|
||||
#ifndef _KERNEL_VM_STORE_ANONYMOUS_H
|
||||
#define _KERNEL_VM_STORE_ANONYMOUS_H
|
||||
|
||||
|
||||
#include <vm_types.h>
|
||||
|
||||
vm_store *vm_store_create_anonymous_noswap(bool stack, int32 numGuardPages);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
vm_store *vm_store_create_anonymous_noswap(bool canOvercommit, int32 numGuardPages);
|
||||
|
||||
#endif /* _KERNEL_VM_STORE_ANONYMOUS_H */
|
||||
|
||||
@@ -187,7 +187,13 @@ enum {
|
||||
(B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_KERNEL_EXECUTE_AREA \
|
||||
| B_KERNEL_STACK_AREA)
|
||||
|
||||
#define B_OVERCOMMITTING_AREA 0x1000
|
||||
// ToDo: this is not really a protection flag, but since the "protection"
|
||||
// field is the only flag field, we currently use it for this.
|
||||
// A cleaner approach would be appreciated - maybe just an official generic
|
||||
// flags region in the protection field.
|
||||
|
||||
#define B_USER_AREA_FLAGS (B_USER_PROTECTION)
|
||||
#define B_KERNEL_AREA_FLAGS (B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA)
|
||||
#define B_KERNEL_AREA_FLAGS (B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA | B_OVERCOMMITTING_AREA)
|
||||
|
||||
#endif /* _KERNEL_VM_TYPES_H */
|
||||
|
||||
Reference in New Issue
Block a user