engine/sdl/gp2x/gp2xport.c
//Returns the size of a UpperMalloced block.
Returns the size of a UpperMalloced block.
Returns the size of a UpperMalloced block .
int GetUpperSize(void* mem)
{
#ifndef WIZ
	int i = (((int)mem) - ((int)UpperMem));
	if(i < 0 || i >= 0x2000000)
	{
		writeToLogFile("GetUpperSize of not UpperMalloced mem: %p\n", mem);
		return -1;
	}
	return TakenSize[i / BLOCKSIZE] * BLOCKSIZE;
#else
	return 0;
#endif
}
int GetUpperSize ( void * mem ) { #ifndef WIZ int i = ( ( ( int ) mem ) - ( ( int ) UpperMem ) ) ; if ( i < 0 || i >= 0x2000000 ) { writeToLogFile ( " \n " , mem ) ; return -1 ; } return TakenSize [ i / BLOCKSIZE ] * BLOCKSIZE ; #else return 0 ; #endif }
Returns the size of a UpperMalloced block.
Returns the size of a UpperMalloced block .