//CFTTMemPool_Static - [2020-04-13 11:57:46]
#ifndef _CFTTMEMPOOL_STATIC_H_
#define _CFTTMEMPOOL_STATIC_H_

#include <stdio.h>
#include <stdlib.h>
#include "common_type.h"
#include "mem_enum.h"

/*
001FB09C CFTTMemPool_Static::Allocate()
001FB0CC CFTTMemPool_Static::CFTTMemPool_Static(uint, uint, char *, EFTTMemHeapID)
001FB1AA CFTTMemPool_Static::Owns(void *)
001FB1C4 CFTTMemPool_Static::~CFTTMemPool_Static()
0x18
*/

struct TestNode {
  uchar* pNode;
  int dd;
};

class CFTTMemPool_Static {
public:
  CFTTMemPool_Static(uint dsize,
                     uint dcount,
                     char* pOutSetBuf,
                     EFTTMemHeapID dtype);  //001FB0CC
  ~CFTTMemPool_Static();                    //001FB1C4
  void* Allocate();                         //001FB09C
  bool Owns(void* pAddr) const;             //001FB1AA
  //void Release(void* pAddr);                //自己加的函数

  uchar* pBuf_0;
  uchar* pNextAlloc_4;  //指向下一个可以分配的内存地址
  uint nodesize_8;      //结点大小
  uint nodecount_C;     //结点个数
  int dAllocCount_10;   //已分配个数 referenceCount
  bool bIsOwnerBuf_14;  //是否自己分配的内存，如果是自己分配的在析构函数要释放
};

#endif  //_CFTTMEMPOOL_STATIC_H_