windows-nt/Source/XPSP1/NT/net/layer2svc/wlpolicy/memory.h
2020-09-26 16:20:57 +08:00

115 lines
1.1 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _MEMORY_H_INCLUDED_
#define _MEMORY_H_INCLUDED_
#ifdef __cplusplus
extern "C" {
#endif
LPVOID
AllocSPDMem(
DWORD cb
);
BOOL
FreeSPDMem(
LPVOID pMem
);
LPVOID
ReallocSPDMem(
LPVOID pOldMem,
DWORD cbOld,
DWORD cbNew
);
LPWSTR
AllocSPDStr(
LPWSTR pStr
);
BOOL
FreeSPDStr(
LPWSTR pStr
);
BOOL
ReallocSPDStr(
LPWSTR *ppStr,
LPWSTR pStr
);
DWORD
AllocateSPDMemory(
DWORD cb,
LPVOID * ppMem
);
void
FreeSPDMemory(
LPVOID pMem
);
DWORD
AllocateSPDString(
LPWSTR pszString,
LPWSTR * ppszNewString
);
void
FreeSPDString(
LPWSTR pszString
);
#if DBG
extern LIST_ENTRY SPDMemList ;
extern CRITICAL_SECTION SPDMemCritSect ;
VOID InitSPDMem(
VOID
) ;
VOID AssertSPDMemLeaks(
VOID
) ;
VOID
DumpMemoryTracker();
#else
#define InitSPDMem()
#define AssertSPDMemLeaks()
#define DumpMemoryTracker()
#endif
#ifdef __cplusplus
}
#endif
/*
inline void * _CRTAPI1
operator new(size_t size)
{
return AllocSPDMem(size);
}
inline void _CRTAPI1
operator delete(void * pv)
{
FreeSPDMem(pv);
}*/
#endif // _MEMORY_H_INCLUDED_