/*
 
 
NetMemCo.h : dynamic memory allocation interface
 
 
*/
 
#if! defined(__MEMSYS_H__)
#define __MEMSYS_H__
 
#ifdef NET_MEMORY_DEBUG
#include <crtdbg.h>
#endif
 
typedef char *tdpPointer;
typedef unsigned long tduxBlockSize;
 
#ifdef NET_MEMORY_DEBUG
  void *pMallocDebug(tduxBlockSize ulSize,int blockType,const char *filename,int linenumber);
  void vFreeDebug(void *p_vMemBlock, int blockType);
  void *pReallocDebug(void *p_vMemBlock,tduxBlockSize ulSize,int blockType,const char *filename, int linenumber);
#ifdef VISUAL
  #define pMalloc(ulSize) pMallocDebug(ulSize,_NORMAL_BLOCK,__FILE__,__LINE__)
  #define vFree(p_vMemBlock) vFreeDebug(p_vMemBlock,_NORMAL_BLOCK)
  #define pRealloc(p_vMemBlock,ulSize) pReallocDebug(p_vMemBlock,ulSize,_NORMAL_BLOCK,__FILE__,__LINE__)
#endif /* VISUAL */
#ifdef WATCOM
  #define pMalloc(ulSize) malloc(ulSize)
  #define vFree(p_vMemBlock) free(p_vMemBlock)
  #define pRealloc(p_vMemBlock, ulSize) realloc(p_vMemBlock, ulSize)
#endif
#else
  void *pMalloc(tduxBlockSize ulSize);
  void vFree(void *p_vMemBlock);
  void *pRealloc(void *p_vMemBlock,tduxBlockSize ulSize);
#endif
 
tduxBlockSize uxInitMalloc(tduxBlockSize uxPoolSize, void *pAddress);
void vDoneMalloc(void);
 
#endif /* __MEMSYS_H__ */
