mem.h
来自「模仿cisco路由器」· C头文件 代码 · 共 49 行
H
49 行
/* Copyright (C) 2002, 2003 Slava Astashonok <sla@0n.ru> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. $Id: mem.h,v 1.1.1.1.2.1 2003/03/28 22:57:51 sla Exp $*/#ifndef _MEM_H_#define _MEM_H_#if MEM_BITS != 0 && MEM_BITS != 8 && MEM_BITS != 16#error illegal value in MEM_BITS#endif#if defined _REENTRANT || defined _THREAD_SAFE#define MEM_THREADSAFE#endif#include <inttypes.h>#if MEM_BITS == 0typedef void* mem_index_t;#endif#if MEM_BITS == 8typedef uint8_t mem_index_t;#endif#if MEM_BITS == 16typedef uint16_t mem_index_t;#endifvoid *mem_alloc();void mem_free(void *);int mem_init(unsigned int, unsigned int, unsigned int);struct Mem { struct Mem *next; unsigned int free; void *first; void *last; /* mem_index_t mem_index_table[bulk_quantity] struct UserDef element_table[bulk_quantity] */};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?