Source code of Windows XP (NT5)
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.
 
 
 
 
 
 

72 lines
1.1 KiB

#include "TsunamiP.Hxx"
#pragma hdrstop
#if DBG
PVOID DbgAllocateHeap
(
IN PCHAR File,
IN int Line,
IN ULONG Flags,
IN ULONG Size
)
{
PVOID pv;
ASSERT( Flags == 0 );
pv= IisCalloc( Size + sizeof( PCHAR ) + sizeof( PCHAR ));
if ( pv )
{
*((PCHAR *)pv)=File;
pv= (( PCHAR *)pv)+1;
*((int *)pv)=Line;
pv= (( PCHAR *)pv)+1;
}
return( pv );
}
PVOID DbgReAllocateHeap
(
IN PCHAR File,
IN int Line,
IN ULONG Flags,
IN PVOID pvOld,
IN ULONG Size
)
{
PVOID pv;
ASSERT( Flags == 0 );
pvOld = (PVOID)( ((PCHAR)pvOld) - (sizeof( PCHAR ) + sizeof( PCHAR )) );
pv=IisReAlloc( pvOld, Size + sizeof( PCHAR ) + sizeof( PCHAR ) );
if ( pv )
{
pv = (PVOID)( ((PCHAR)pv) + sizeof( PCHAR ) + sizeof( PCHAR ) );
}
return( pv );
}
BOOL DbgFreeHeap
(
IN PCHAR File,
IN int Line,
IN ULONG Flags,
IN PVOID pvOld
)
{
ASSERT( Flags == 0 );
pvOld = (PVOID)( ((PCHAR)pvOld) - (sizeof( PCHAR ) + sizeof( PCHAR )) );
return IisFree( pvOld );
}
#endif // DBG