1/*
2 * Copyright 2006-2011, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Axel D��rfler, axeld@pinc-software.de
7 */
8#ifndef SERVER_MEMORY_ALLOCATOR_H
9#define SERVER_MEMORY_ALLOCATOR_H
10
11
12#include <OS.h>
13#include <List.h>
14
15
16namespace BPrivate {
17
18
19class ServerMemoryAllocator {
20public:
21								ServerMemoryAllocator();
22								~ServerMemoryAllocator();
23
24			status_t			InitCheck();
25
26			status_t			AddArea(area_id serverArea, area_id& _localArea,
27									uint8*& _base, size_t size,
28									bool readOnly = false);
29			void				RemoveArea(area_id serverArea);
30
31			status_t			AreaAndBaseFor(area_id serverArea,
32									area_id& area, uint8*& base);
33
34private:
35			BList				fAreas;
36};
37
38
39}	// namespace BPrivate
40
41
42#endif	// SERVER_MEMORY_ALLOCATOR_H
43