⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ospf_memory.h

📁 vxworks下ospf协议栈
💻 H
字号:
/* ospf_memory.h *//* Copyright 2001-2003 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history___________________ 02a,17feb02,ram    SPR 81808 Added OSPF memory partition support - initial creation*/#if !defined (_OSPF_MEMORY_H_)#define _OSPF_MEMORY_H_#define OSPF_PARTMEM_LARGE_SIZE     (2048 * 1024)   /* 2M Preferred initial memory partition size                                                    * 2 Megs */#define OSPF_PARTMEM_SMALL_SIZE     (128 * 1024)   /* Alternate Initial memory partition size */#define OSPF_PARTMEM_GROW_VALUE (16 * 1024)        /* Memory partition grow value *//* OSPF memory partition defintions *//* Undefine older memory macros */#if defined (buffer_malloc)#undef buffer_malloc#endif#if defined (buffer_free)#undef buffer_free#endif#if defined (table_malloc)#undef table_malloc#endif#if defined (table_free)#undef table_free#endif#if defined (message_malloc)#undef message_malloc#endif#if defined (message_free)#undef message_free#endif/* Define new memory macros */#define OSPF_PARTMEM_CREATE             usrMemPartAvlCreate#define OSPF_PARTMEM_DELETE             usrMemPartAvlDelete(ospfMemPartId)#define OSPF_PARTMEM_EXPAND(size)       usrMemPartAvlExpand(ospfMemPartId,size)/* OSPF currently is not setting any error options other than the default * MEM_BLOCK_ERROR_SUSPEND_FLAG */#define OSPF_PARTMEM_ERR_OPTION(option) usrMemPartSetErrorOptions(ospfMemPartId,option)#define OSPF_PARTMEM_SHOW(option)       usrMemPartAvlInfoShow(ospfMemPartId,option)/* Configure OSPF partition to allow growing by OSPF_PARTMEM_GROW_VALUE & reclaiming */#define OSPF_PARTMEM_CONFIG             usrMemPartAvlGrowReclaimConfig(ospfMemPartId,TRUE,TRUE,OSPF_PARTMEM_GROW_VALUE)/* Redefine original allocation/freeing macros */#define buffer_malloc(size)             usrMemPartAvlMalloc(ospfMemPartId,size)#define table_malloc(units,size)        usrMemPartAvlCalloc(ospfMemPartId,units,size)#define message_malloc(size)            usrMemPartAvlMalloc(ospfMemPartId,size)#define buffer_free(ptr)                usrMemPartAvlFree(ospfMemPartId,(void*)ptr)#define table_free(ptr)                 usrMemPartAvlFree(ospfMemPartId,(void*)ptr)#define message_free(ptr)               usrMemPartAvlFree(ospfMemPartId,(void*)ptr)/***********************************/#endif /* _OSPF_MEMORY_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -