NVMLib  very early alpha
A library to optimally use a Hybrid RAM setup.
mem_log.h
Go to the documentation of this file.
1 #ifndef __MEM_LOG_H__
2 #define __MEM_LOG_H__
3 
4 #include "malloc.h"
5 #include <time.h>
6 #include <sys/queue.h>
7 
8 typedef struct address_log {
10  size_t offset;
11  size_t size;
12  time_t access_time;
15 
16 TAILQ_HEAD(address_list_write_queue, address_log) write_queue_head;
17 TAILQ_HEAD(address_list_read_queue, address_log) read_queue_head;
18 
20 void log_write(void* addr, size_t size);
21 void log_read(void* addr, size_t size);
22 
23 #endif //__MEM_LOG_H__
address_log::access_time
time_t access_time
Definition: mem_log.h:12
address_log
Definition: mem_log.h:8
address_log::TAILQ_ENTRY
TAILQ_ENTRY(address_log) list
address_log::key
MEMoidKey key
Definition: mem_log.h:9
log_write
void log_write(void *addr, size_t size)
Function to record the memory addresses written into in a given object.
Definition: mem_log.c:23
MEMoidKey
uint64_t MEMoidKey
The key of the HashTable that contains <MEMoidKey, MEMoid>.
Definition: malloc.h:49
log_read
void log_read(void *addr, size_t size)
Function to record the memory addresses read from in a given object.
Definition: mem_log.c:52
initialize_log_queues
void initialize_log_queues()
Definition: mem_log.c:7
malloc.h
address_log
struct address_log address_log
address_log::size
size_t size
Definition: mem_log.h:11
TAILQ_HEAD
TAILQ_HEAD(address_list_write_queue, address_log) write_queue_head
address_log::offset
size_t offset
Definition: mem_log.h:10