#include #include #include #include #include #include #include #include #include "main.h" WUPS_PLUGIN_NAME("Memory Info"); WUPS_PLUGIN_DESCRIPTION("Prints information about the current memory usage when pressing L+R+X+Y+A+B."); WUPS_PLUGIN_VERSION("v1.0"); WUPS_PLUGIN_AUTHOR("Maschell"); WUPS_PLUGIN_LICENSE("GPL"); ON_APPLICATION_START(args) { socket_lib_init(); log_init(); } void printMemHeapInfo(memHeapInfo * listStart, uint32_t listLength, const char * listname) { for(int32_t i = 0; i "); } else { log_printf(" parent: 0x%08X ", parent); } log_printf(" address 0x%08X handle 0x%08X size %07d kb old size %07d kb flags 0x%04X\n",listStart[i].address,listStart[i].handle,listStart[i].size/1024,listStart[i].oldSize/1024,listStart[i].flags); } } } void print_memory_info() { DEBUG_FUNCTION_LINE("Print expanded heap infos\n"); printMemHeapInfo(expHeapPointer,MAX_EXP_HEAP_INFOS, "Expanded heap:"); DEBUG_FUNCTION_LINE("Print frmHeap\n"); printMemHeapInfo(frmHeapPointer,MAX_FRM_HEAP_INFOS, "Frame heap:"); DEBUG_FUNCTION_LINE("Print unitHeap\n"); for(int32_t i = 0; i