2 * Copyright 2008-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de.
4 * Distributed under the terms of the MIT License.
6 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
7 * Distributed under the terms of the NewOS License.
9 #ifndef _KERNEL_VM_STORE_ANONYMOUS_NO_SWAP_H
10 #define _KERNEL_VM_STORE_ANONYMOUS_NO_SWAP_H
13 #include <vm/VMCache.h>
16 class VMAnonymousNoSwapCache
: public VMCache
{
18 virtual ~VMAnonymousNoSwapCache();
20 status_t
Init(bool canOvercommit
,
21 int32 numPrecommittedPages
,
23 uint32 allocationFlags
);
25 virtual status_t
Commit(off_t size
, int priority
);
26 virtual bool HasPage(off_t offset
);
28 virtual int32
GuardSize() { return fGuardedSize
; }
30 virtual status_t
Read(off_t offset
, const generic_io_vec
*vecs
,
31 size_t count
,uint32 flags
,
32 generic_size_t
*_numBytes
);
33 virtual status_t
Write(off_t offset
, const generic_io_vec
*vecs
,
34 size_t count
, uint32 flags
,
35 generic_size_t
*_numBytes
);
37 virtual status_t
Fault(struct VMAddressSpace
* aspace
,
40 virtual void MergeStore(VMCache
* source
);
43 virtual void DeleteObject();
47 bool fHasPrecommitted
;
48 uint8 fPrecommittedPages
;
53 #endif /* _KERNEL_VM_STORE_ANONYMOUS_NO_SWAP_H */