📄 sharemem.h
字号:
/* * Copyright (C) 2006, Binary Ma * Licence: GNU GPL 1991 - version 2 * Bug report: binary@eniak.org*/#ifndef __LIB_SHAREMEM #define __LIB_SHAREMEM 1#include <string>using namespace std;class memmap{public: memmap( const char* file, off_t length = -1 ); ~memmap(); int size(); char* map;private: off_t map_size;};class share{public: share( int size, const char* name ); share( int size ); ~share(); char* share_open(); int share_close( bool force = false ); int error();private: void init_tmpfs(); int id; string name; char* buf; int size; bool create; const char* mnt; int eno;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -