NVMLib  very early alpha
A library to optimally use a Hybrid RAM setup.
globals.h File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
#include <uv.h>
#include <errno.h>
Include dependency graph for globals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DRAM_STACK   0
 Types of allocation. More...
 
#define NVRAM_STACK   1
 Types of allocation. More...
 
#define DRAM_HEAP   2
 Types of allocation. More...
 
#define NVRAM_HEAP   3
 Types of allocation. More...
 
#define ANY_RAM   4
 Types of allocation. More...
 
#define TYPES_TABLE_POOL   strcat(program_invocation_short_name, "types_table")
 
#define ALLOC_LIST_POOL   strcat(program_invocation_short_name, "alloc_list")
 
#define TYPES_TABLE_LAYOUT   "types_table"
 
#define ALLOC_LIST_LAYOUT   "alloc_list"
 
#define MAIN_LOG_FILE_NAME   "./nvm_main_log.log"
 The main log file where all the program runtime related info is recorded. More...
 
#define MAIN_LOG_FILE   main_log_file_fd
 

Typedefs

typedef __uint128_t uint128_t
 
typedef __uint64_t uint64_t
 
typedef __uint32_t uint32_t
 
typedef __uint16_t uint16_t
 
typedef __uint8_t uint8_t
 
typedef unsigned long int uintptr_t
 
typedef long int intptr_t
 

Variables

char * program_invocation_short_name
 The predefined pools. More...
 
FILE * main_log_file_fd
 
uv_mutex_t object_maintainence_hashmap_mutex
 The mutex used during manupulation of types map More...
 
uv_mutex_t object_maintainence_memory_mutex
 The mutex used during nvm_free / access too. More...
 
uv_mutex_t object_maintainence_maintain_map_mutex
 The mutex used during manupulation of maintainance map More...
 
uv_mutex_t object_maintainence_addtion_mutex
 The mutex used during manupulation of maintainance map More...
 
uv_mutex_t object_maintainence_deletion_mutex
 The mutex used during manupulation of maintainance map More...
 
uv_mutex_t read_splay_tree_mutex
 The mutex used during manupulation of read splay tree More...
 
uv_mutex_t write_splay_tree_mutex
 The mutex used during manupulation of read splay tree More...
 

Macro Definition Documentation

◆ ALLOC_LIST_LAYOUT

#define ALLOC_LIST_LAYOUT   "alloc_list"

Definition at line 67 of file globals.h.

◆ ALLOC_LIST_POOL

#define ALLOC_LIST_POOL   strcat(program_invocation_short_name, "alloc_list")

Definition at line 63 of file globals.h.

◆ ANY_RAM

#define ANY_RAM   4

Types of allocation.

When the object can be placed anywhere.

Note
This is for internal usage only. It is not exposed outside.
See also
decide_allocation() _memalloc()

Definition at line 49 of file globals.h.

◆ DRAM_HEAP

#define DRAM_HEAP   2

Types of allocation.

When the object is supposed to be in DRAM heap

See also
decide_allocation()

Definition at line 34 of file globals.h.

◆ DRAM_STACK

#define DRAM_STACK   0

Types of allocation.

When the object is supposed to be in DRAM stack

See also
decide_allocation()

Definition at line 20 of file globals.h.

◆ MAIN_LOG_FILE

#define MAIN_LOG_FILE   main_log_file_fd

Definition at line 72 of file globals.h.

◆ MAIN_LOG_FILE_NAME

#define MAIN_LOG_FILE_NAME   "./nvm_main_log.log"

The main log file where all the program runtime related info is recorded.

Definition at line 70 of file globals.h.

◆ NVRAM_HEAP

#define NVRAM_HEAP   3

Types of allocation.

When the object is supposed to be in NVRAM heap

See also
decide_allocation()

Definition at line 41 of file globals.h.

◆ NVRAM_STACK

#define NVRAM_STACK   1

Types of allocation.

When the object is supposed to be in NVRAM stack

See also
decide_allocation()

Definition at line 27 of file globals.h.

◆ TYPES_TABLE_LAYOUT

#define TYPES_TABLE_LAYOUT   "types_table"

Definition at line 66 of file globals.h.

◆ TYPES_TABLE_POOL

#define TYPES_TABLE_POOL   strcat(program_invocation_short_name, "types_table")

Definition at line 62 of file globals.h.

Typedef Documentation

◆ intptr_t

typedef long int intptr_t

Definition at line 57 of file globals.h.

◆ uint128_t

typedef __uint128_t uint128_t

Definition at line 50 of file globals.h.

◆ uint16_t

typedef __uint16_t uint16_t

Definition at line 53 of file globals.h.

◆ uint32_t

typedef __uint32_t uint32_t

Definition at line 52 of file globals.h.

◆ uint64_t

typedef __uint64_t uint64_t

Definition at line 51 of file globals.h.

◆ uint8_t

typedef __uint8_t uint8_t

Definition at line 54 of file globals.h.

◆ uintptr_t

typedef unsigned long int uintptr_t

Definition at line 56 of file globals.h.

Variable Documentation

◆ main_log_file_fd

FILE* main_log_file_fd

Definition at line 70 of file globals.h.

◆ object_maintainence_addtion_mutex

uv_mutex_t object_maintainence_addtion_mutex

The mutex used during manupulation of maintainance map

Definition at line 16 of file object_maintainance.c.

◆ object_maintainence_deletion_mutex

uv_mutex_t object_maintainence_deletion_mutex

The mutex used during manupulation of maintainance map

Definition at line 17 of file object_maintainance.c.

◆ object_maintainence_hashmap_mutex

uv_mutex_t object_maintainence_hashmap_mutex

The mutex used during manupulation of types map

Definition at line 13 of file object_maintainance.c.

◆ object_maintainence_maintain_map_mutex

uv_mutex_t object_maintainence_maintain_map_mutex

The mutex used during manupulation of maintainance map

Definition at line 15 of file object_maintainance.c.

◆ object_maintainence_memory_mutex

uv_mutex_t object_maintainence_memory_mutex

The mutex used during nvm_free / access too.

Definition at line 14 of file object_maintainance.c.

◆ program_invocation_short_name

char* program_invocation_short_name

The predefined pools.

◆ read_splay_tree_mutex

uv_mutex_t read_splay_tree_mutex

The mutex used during manupulation of read splay tree

Definition at line 18 of file object_maintainance.c.

◆ write_splay_tree_mutex

uv_mutex_t write_splay_tree_mutex

The mutex used during manupulation of read splay tree

Definition at line 19 of file object_maintainance.c.