Classes | Defines | Enumerations | Functions | Variables

src/vm_ftl.c File Reference

#include <stdlib.h>
#include <string.h>
#include "debug.h"
#include "nand.h"
#include "vmbitmap.h"
#include "map.h"
#include "ftl.h"
#include "stat.h"
Include dependency graph for vm_ftl.c:

Go to the source code of this file.

Classes

struct  vbm_entry
struct  _t_vm

Defines

#define MIN_FREE_BLKS   10
#define GC_BLKS   5

Enumerations

enum  { BLOCK_FREE = 0, BLOCK_DATA, BLOCK_INDEX, BLOCK_GC }

Functions

_t_blk vm_alloc_block (int reqtype)
_u32 vm_alloc_page (_t_sect lsn, _t_blk *pbn, _t_page *ppn, int reqtype)
_t_blk vm_get_victim ()
int bitmap_sum (_u8 *bitmap)
void vm_gc_run (_t_blk victim)
void vm_clear_block (_t_blk victim, int type)
void vm_invalidate (_t_blk victim, _t_page ppn, _t_size length)
int vm_gc_check ()
void vm_gc_start ()
void vm_end ()
void vm_init ()

Variables

int indexpages
static struct _t_vm vm

Define Documentation

#define GC_BLKS   5

Definition at line 11 of file vm_ftl.c.

#define MIN_FREE_BLKS   10

Definition at line 10 of file vm_ftl.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
BLOCK_FREE 
BLOCK_DATA 
BLOCK_INDEX 
BLOCK_GC 

Definition at line 15 of file vm_ftl.c.


Function Documentation

int bitmap_sum ( _u8 bitmap  ) 

Definition at line 163 of file vm_ftl.c.

Here is the caller graph for this function:

_t_blk vm_alloc_block ( int  reqtype  ) 

Definition at line 49 of file vm_ftl.c.

Here is the caller graph for this function:

_u32 vm_alloc_page ( _t_sect  lsn,
_t_blk pbn,
_t_page ppn,
int  reqtype 
)

Definition at line 89 of file vm_ftl.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void vm_clear_block ( _t_blk  victim,
int  type 
)

Definition at line 211 of file vm_ftl.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void vm_end (  ) 

Definition at line 294 of file vm_ftl.c.

Here is the caller graph for this function:

int vm_gc_check (  ) 

Definition at line 250 of file vm_ftl.c.

Here is the caller graph for this function:

void vm_gc_run ( _t_blk  victim  ) 

Definition at line 174 of file vm_ftl.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void vm_gc_start (  ) 

Definition at line 258 of file vm_ftl.c.

Here is the call graph for this function:

Here is the caller graph for this function:

_t_blk vm_get_victim (  ) 

Definition at line 127 of file vm_ftl.c.

Here is the caller graph for this function:

void vm_init (  ) 

Definition at line 312 of file vm_ftl.c.

Here is the caller graph for this function:

void vm_invalidate ( _t_blk  victim,
_t_page  ppn,
_t_size  length 
)

Definition at line 235 of file vm_ftl.c.

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 13 of file vm_ftl.c.

struct _t_vm vm [static]
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines