Windows NT 4.0 source code leak
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.
 
 
 
 
 
 

37 lines
680 B

#include <stdio.h>
#include <malloc.h>
void heapdump(void);
void heapdump( void )
{
struct _heapinfo hinfo;
int heapstatus;
hinfo._pentry = NULL;
while( (heapstatus = _heapwalk( &hinfo ) ) == _HEAPOK );
switch( heapstatus )
{
case _HEAPEND:
printf("Heap was OK\n");
return;
case _HEAPBADPTR:
printf( "(_HEAPBADPTR) Bad Heap at %Fp of size %4.4X\n",
hinfo._pentry,
hinfo._size );
break;
case _HEAPBADBEGIN:
printf( "(_HEAPBADBEGIN) Bad Heap at %Fp of size %4.4X\n",
hinfo._pentry,
hinfo._size );
break;
case _HEAPBADNODE:
printf( "(_HEAPBADNODE) Bad Heap at %Fp of size %4.4X\n",
hinfo._pentry,
hinfo._size );
break;
}
}