It would have been easier to find the bug if you could run it on win

Ok I checked up my old HCE sources and found these methods:
CODE
MEMORYSTATUS stat;
GlobalMemoryStatus( &stat );
You can use this to see if there is a memory leak. Don't have a modded xbox so can't test the code.
Btw, the method is a normal Xbox XDK method so you can find information about it in the Xbox XDK Documentation.
CODE
//------------------------------------------------------------------------------
// globstat.cpp
//
// Example use of GlobalMemoryStatus()
//
// Sample output:
//
// 2047 total MB of virtual memory.
// 2046 free MB of virtual memory.
// 64 total MB of physical memory.
// 63 free MB of physical memory.
// 0 total MB of paging file.
// 0 free MB of paging file.
// 0 percent of memory is in use.
//------------------------------------------------------------------------------
#include
// 1 megabyte
#define MB (1024*1024)
// Add one line of text to the output buffer.
#define AddStr(a,b) (pstrOut += wsprintf( pstrOut, a, b ))
void main( int argc, char *argv[] )
{
MEMORYSTATUS stat;
CHAR strOut[1024], *pstrOut;
// Get the memory status.
GlobalMemoryStatus( &stat );
// Setup the output string.
pstrOut = strOut;
AddStr( "%4d total MB of virtual memory.\n", stat.dwTotalVirtual / MB );
AddStr( "%4d free MB of virtual memory.\n", stat.dwAvailVirtual / MB );
AddStr( "%4d total MB of physical memory.\n", stat.dwTotalPhys / MB );
AddStr( "%4d free MB of physical memory.\n", stat.dwAvailPhys / MB );
AddStr( "%4d total MB of paging file.\n", stat.dwTotalPageFile / MB );
AddStr( "%4d free MB of paging file.\n", stat.dwAvailPageFile / MB );
AddStr( "%4d percent of memory is in use.\n", stat.dwMemoryLoad );
// Output the string.
OutputDebugString( strOut );
// Don't return from main!
Sleep( INFINITE );
}