32
/*
* Memory management.
* Increase MAX_STRING if you have too.
* Tune the others only if you understand what you're doing.
*/
#define MAX_STRING 1413120
#define MAX_PERM_BLOCK 131072
extern int port;
#if (port == 8662)
#define MAX_STRING 6291456 // Coder port 6x 1024*1024
#else
#if (port == 8650)
#define MAX_STRING 9437184// 9*1024*1024 (on 11/01/09)
#else
#define MAX_STRING 8388608
#endif
#endif
void *alloc_perm( int sMem )
{ void *mem;
if( (mem = calloc(1, sMem) ) == NULL )
{ perror("alloc_perm");
exit(1);
}
nAllocPerm += 1;
sAllocPerm += sMem;
return mem;
}
It's my understanding that RoM takes all of the areas and compiles into one big string (MAX_STRING must then hold). So as your game increases in amount of rooms, mobs etc, you'll need to increase MAX_STRING. Then, MAX_PERM_BLOCK, is the largest block of perm allocated memory right?
Anyway, having issues and wondered if the MAX_PERM_BLOCK should be raised (stock is 128k, 131072 bytes).
Any help would rock, thanks guys.