shm implemented as memfd syscall
cheliequan
2022-12-02 ddc93e90e36d78d110b4168768ce49c4d06e80f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
#ifndef MEMFD_H  
#define MEMFD_H  
#include "unistd.h"
 
#ifdef __cplusplus 
extern "C" { 
#endif
 
int basic_shm_create(char *name, ssize_t len);
int basic_shm_open(int fd, pid_t pid, int flags);
int basic_shm_mmap(int fd, unsigned char** ppaddr);
int basic_shm_unmmap(int fd, unsigned char** ppaddr);
int basic_shm_close(int fd);
int basic_shm_shrink(int fd, ssize_t len);
int basic_shm_grow(int fd, ssize_t len);
#ifdef __cplusplus 
#endif
#endif