Repository navigation
Expand file tree
/
Copy pathframe_pool.H
More file actions
executable file
·57 lines (39 loc) · 1.66 KB
/
Copy pathframe_pool.H
File metadata and controls
executable file
·57 lines (39 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
File: frame_pool.H
Author: R. Bettati
Department of Computer Science
Texas A&M University
Date : 09/03/05
Description: Management of the Free-Frame Pool.
*/
#ifndef _FRAME_POOL_H_ // include file only once
#define _FRAME_POOL_H_
/*--------------------------------------------------------------------------*/
/* DEFINES */
/*--------------------------------------------------------------------------*/
/* -- (none) -- */
/*--------------------------------------------------------------------------*/
/* INCLUDES */
/*--------------------------------------------------------------------------*/
/* -- (none) -- */
/*--------------------------------------------------------------------------*/
/* DATA STRUCTURES */
/*--------------------------------------------------------------------------*/
/* -- (none) -- */
/*--------------------------------------------------------------------------*/
/* F r a m e P o o l */
/*--------------------------------------------------------------------------*/
class FramePool {
public:
FramePool();
/* Initializes the data structures needed for the management of the
free frame pool. This function must be called before the paging system
is initialized. */
unsigned long get_frame();
/* Allocates a frame from the frame pool. If successful, returns the physical
address of the frame. If fails, returns 0x0. */
void release_frame(unsigned long _frame_address);
/* Releases frame back to the given frame pool.
The frame is identified by the physical address. */
};
#endif