CS318 - Pintos
Pintos source browser for JHU CS318 course
src
filesys
free-map.h
Go to the documentation of this file.
1
#ifndef FILESYS_FREE_MAP_H
2
#define FILESYS_FREE_MAP_H
3
4
#include <
stdbool.h
>
5
#include <
stddef.h
>
6
#include "
devices/block.h
"
7
8
void
free_map_init
(
void
);
9
void
free_map_read
(
void
);
10
void
free_map_create
(
void
);
11
void
free_map_open
(
void
);
12
void
free_map_close
(
void
);
13
14
bool
free_map_allocate
(
size_t
,
block_sector_t
*);
15
void
free_map_release
(
block_sector_t
,
size_t
);
16
17
#endif
/**< filesys/free-map.h */
block.h
free_map_open
void free_map_open(void)
Opens the free map file and reads it from disk.
Definition:
free-map.c:54
free_map_read
void free_map_read(void)
stdbool.h
block_sector_t
uint32_t block_sector_t
Index of a block device sector.
Definition:
block.h:15
free_map_allocate
bool free_map_allocate(size_t, block_sector_t *)
Allocates CNT consecutive sectors from the free map and stores the first into *SECTORP.
Definition:
free-map.c:28
free_map_create
void free_map_create(void)
Creates a new free map file on disk and writes the free map to it.
Definition:
free-map.c:73
free_map_init
void free_map_init(void)
Initializes the free map.
Definition:
free-map.c:13
free_map_release
void free_map_release(block_sector_t, size_t)
filesys/free-map.h
Definition:
free-map.c:45
stddef.h
free_map_close
void free_map_close(void)
Writes the free map to disk and closes the free map file.
Definition:
free-map.c:65
Generated on Thu Aug 22 2019 10:19:15 for CS318 - Pintos by
1.8.16