//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.

相关文章:

  • 2022-01-13
  • 2021-11-23
  • 2021-04-02
  • 2021-06-24
  • 2021-10-03
  • 2021-10-03
  • 2021-10-03
  • 2021-08-30
猜你喜欢
  • 2021-11-23
  • 2021-11-23
  • 2021-08-07
  • 2021-07-31
  • 2021-08-05
  • 2021-10-25
  • 2021-09-05
相关资源
相似解决方案