Set bitmap block size to page size
This commit is contained in:
@ -5,6 +5,8 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "hal/hal.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t *map;
|
uint8_t *map;
|
||||||
size_t nblocks;
|
size_t nblocks;
|
||||||
@ -15,7 +17,7 @@ typedef struct {
|
|||||||
} BitMap;
|
} BitMap;
|
||||||
|
|
||||||
#define BITMAP_BLOCKS_PER_BYTE 8
|
#define BITMAP_BLOCKS_PER_BYTE 8
|
||||||
#define BITMAP_BLOCK_SIZE 0x1000
|
#define BITMAP_BLOCK_SIZE HAL_PAGE_SIZE
|
||||||
#define BITMAP_INVALID_BLOCK ((size_t)-1)
|
#define BITMAP_INVALID_BLOCK ((size_t)-1)
|
||||||
|
|
||||||
void *bitmap_toptr(BitMap *bm, size_t block);
|
void *bitmap_toptr(BitMap *bm, size_t block);
|
||||||
|
Reference in New Issue
Block a user