2018-08-29 00:53:12 -04:00
|
|
|
#ifndef MEMORY_H
|
|
|
|
#define MEMORY_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2018-10-19 21:29:40 -04:00
|
|
|
int get_metadata_key(void);
|
|
|
|
|
2018-08-29 00:53:12 -04:00
|
|
|
void *memory_map(size_t size);
|
2018-08-29 13:04:52 -04:00
|
|
|
int memory_map_fixed(void *ptr, size_t size);
|
2018-08-29 00:53:12 -04:00
|
|
|
int memory_unmap(void *ptr, size_t size);
|
2018-08-29 10:52:10 -04:00
|
|
|
int memory_protect_ro(void *ptr, size_t size);
|
2018-10-19 21:29:40 -04:00
|
|
|
int memory_protect_rw(void *ptr, size_t size);
|
|
|
|
int memory_protect_rw_metadata(void *ptr, size_t size);
|
2018-10-06 10:40:55 -04:00
|
|
|
int memory_remap(void *old, size_t old_size, size_t new_size);
|
2018-08-29 10:43:54 -04:00
|
|
|
int memory_remap_fixed(void *old, size_t old_size, void *new, size_t new_size);
|
2018-08-29 00:53:12 -04:00
|
|
|
|
|
|
|
#endif
|