EPANET头文件解读系列7——MEMPOOL.H

//EPANET应用程序使用了大量的节点与管段数据,而且每个对象数据又有不同时段的数据,这些数据占用了大量内存,而mempool.h就是一个简单快速的内存分配相关的头文件
/*
**  mempool.h
**
**  Header for mempool.c
**
**  The type alloc_handle_t provides an opaque reference to the
**  alloc pool - only the alloc routines know its structure.
*/

typedef struct
{
   long  dummy;
}  alloc_handle_t;

alloc_handle_t *AllocInit(void);                   //create an alloc pool, returns the old pool handle
char           *Alloc(long);                       //allocate memory
alloc_handle_t *AllocSetPool(alloc_handle_t *);    //reset the current pool
void            AllocReset(void);                  //set the current pool
void            AllocFreePool(void);               //free the memory used by the current pool.

转载于:https://www.cnblogs.com/KingOfFreedom/p/3311859.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值