mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1022 B
77 lines
1022 B
#ifndef _MEMORY_H_INCLUDED_
|
|
#define _MEMORY_H_INCLUDED_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
LPVOID
|
|
ReallocPolMem(
|
|
LPVOID pOldMem,
|
|
DWORD cbOld,
|
|
DWORD cbNew
|
|
);
|
|
|
|
DWORD
|
|
AllocatePolString(
|
|
LPWSTR pszString,
|
|
LPWSTR * ppszNewString
|
|
);
|
|
|
|
void
|
|
FreePolString(
|
|
LPWSTR pszString
|
|
);
|
|
|
|
|
|
#if DBG
|
|
|
|
extern LIST_ENTRY ADsMemList ;
|
|
|
|
extern CRITICAL_SECTION ADsMemCritSect ;
|
|
|
|
VOID InitPolMem(
|
|
VOID
|
|
) ;
|
|
|
|
VOID AssertPolMemLeaks(
|
|
VOID
|
|
) ;
|
|
|
|
|
|
VOID
|
|
DumpMemoryTracker();
|
|
|
|
|
|
#else
|
|
|
|
#define InitPolMem()
|
|
#define AssertPolMemLeaks()
|
|
|
|
#define DumpMemoryTracker()
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
/*
|
|
inline void * _CRTAPI1
|
|
operator new(size_t size)
|
|
{
|
|
return AllocPolMem(size);
|
|
}
|
|
|
|
inline void _CRTAPI1
|
|
operator delete(void * pv)
|
|
{
|
|
FreePolMem(pv);
|
|
}*/
|
|
|
|
|
|
#endif // _MEMORY_H_INCLUDED_
|