 |
NVMLib
very early alpha
A library to optimally use a Hybrid RAM setup.
|
Go to the documentation of this file.
3 #include <libpmemobj.h>
16 strcat(filename,
"_types_table");
17 pop = pmemobj_open(filename, POBJ_LAYOUT_NAME(types_tab));
20 pop = pmemobj_create(filename, POBJ_LAYOUT_NAME(types_tab), 5*PMEMOBJ_MIN_POOL, 0666);
27 printf(
"hmap create result = %d\n",
hm_tx_create(
pop, &hashmap, (
void *)args));
35 printf(
"map address %p\n", (hashmap).oid.off);
void debug_hashmap(MEMoidKey key)
void insert_object_to_hashmap(MEMoidKey key, MEMoid oid)
The struct that stores the memptr for the object.
uint64_t MEMoidKey
The key of the HashTable that contains <MEMoidKey, MEMoid>.
MEMoid hm_tx_remove(PMEMobjpool *pop, TOID(struct hashmap_tx) hashmap, uint64_t key)
Removes specified value from the hashmap.
void remove_object_from_hashmap(MEMoidKey key)
int hm_tx_create(PMEMobjpool *pop, TOID(struct hashmap_tx) *map, void *arg)
Allocates a new hashmap.
int hm_tx_init(PMEMobjpool *pop, TOID(struct hashmap_tx) hashmap)
Recovers hashmap state.
int hm_tx_insert(PMEMobjpool *pop, TOID(struct hashmap_tx) hashmap, uint64_t key, MEMoid value)
Inserts the specified value into the hashmap.
void hm_tx_debug(PMEMobjpool *pop, TOID(struct hashmap_tx) hashmap, FILE *out)
Prints complete hashmap state.
MEMoid get_MEMoid(MEMoidKey key)
The function to obtain the MEMoid object given the MEMoidKey
MEMoid hm_tx_get(PMEMobjpool *pop, TOID(struct hashmap_tx) hashmap, uint64_t key)
Checks whether specified key is in the hashmap and retries the value associated with it.
char * program_invocation_short_name
The predefined pools.