2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the NewOS License.
7 #include "VMKernelArea.h"
10 #include <slab/Slab.h>
11 #include <vm/vm_priv.h>
14 VMKernelArea::VMKernelArea(VMAddressSpace
* addressSpace
, uint32 wiring
,
17 VMArea(addressSpace
, wiring
, protection
)
22 VMKernelArea::~VMKernelArea()
27 /*static*/ VMKernelArea
*
28 VMKernelArea::Create(VMAddressSpace
* addressSpace
, const char* name
,
29 uint32 wiring
, uint32 protection
, ObjectCache
* objectCache
,
30 uint32 allocationFlags
)
32 VMKernelArea
* area
= new(objectCache
, allocationFlags
) VMKernelArea(
33 addressSpace
, wiring
, protection
);
37 if (area
->Init(name
, allocationFlags
) != B_OK
) {
38 object_cache_delete(objectCache
, area
);