NVMLib  very early alpha
A library to optimally use a Hybrid RAM setup.
pool.c File Reference
#include "globals.h"
#include "pool.h"
#include "metadata.h"
#include <libpmemobj.h>
#include <libpmem.h>
#include "hashmap.h"
#include "types.h"
#include "free_slot_list.h"
#include "log.h"
Include dependency graph for pool.c:

Go to the source code of this file.

Functions

static int compare_kv (pool_kv *left, pool_kv *right)
 
static int compare_free_slot (pool_free_slot_val *left, pool_free_slot_val *right)
 
int get_hash_kv (pool_kv *val)
 
int get_hash_free_slot (pool_free_slot_val *val)
 
 HASH_MAP (pool_kv)
 
uintptr_t get_pool_from_poolid (uint64_t pool_id)
 
uint64_t get_current_poolid ()
 
void create_new_pool (size_t size)
 
void nvm_free (uint64_t pool_id, uint64_t offset, size_t size)
 

Function Documentation

◆ compare_free_slot()

static int compare_free_slot ( pool_free_slot_val left,
pool_free_slot_val right 
)
static

Definition at line 18 of file pool.c.

◆ compare_kv()

static int compare_kv ( pool_kv left,
pool_kv right 
)
static

Definition at line 13 of file pool.c.

◆ create_new_pool()

void create_new_pool ( size_t  size)

Definition at line 94 of file pool.c.

Here is the call graph for this function:

◆ get_current_poolid()

uint64_t get_current_poolid ( )

Definition at line 90 of file pool.c.

◆ get_hash_free_slot()

int get_hash_free_slot ( pool_free_slot_val val)

Definition at line 27 of file pool.c.

◆ get_hash_kv()

int get_hash_kv ( pool_kv val)

Definition at line 23 of file pool.c.

◆ get_pool_from_poolid()

uintptr_t get_pool_from_poolid ( uint64_t  pool_id)

Definition at line 79 of file pool.c.

◆ HASH_MAP()

HASH_MAP ( pool_kv  )

Definition at line 33 of file pool.c.

Here is the call graph for this function:

◆ nvm_free()

void nvm_free ( uint64_t  pool_id,
uint64_t  offset,
size_t  size 
)

Flag : 1 – to remove node 2 – to insert node

Definition at line 137 of file pool.c.

Here is the call graph for this function: