sharemem.h
来自「包含客户和服务器的升级程序,在linux下可以运行的.」· C头文件 代码 · 共 48 行
H
48 行
/* * 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 + =
减小字号Ctrl + -
显示快捷键?