hi,
for my pathfinder I'm creating crazy struct arrays containing long arrays. in theory it should work, but I get script crash messages when the struct size go over 50 kbyte. (the limit is not 64 kb)
if the 1st three variables are var, then max 3000 element is working (48000b), but if short even 5000 is okay (50000b). the length "m" of the struct array has no effect on errors at all.
probably I'm wrong with memory allocation. it works now, but I would like to know the error reason, any help welcome. thanks. and of course separate arrays could be used too, I know, but it is more simple to use one parameter when calling functions.
typedef struct // group A* struct
{
short f[5000]; // it was var but short works better -> and works with as high as 5000 elements too!!!
short g[5000]; // it was var but short works better
short h[5000]; // it was var but short works better
short parent_cluster[5000];
char clist[5000]; // BOOL
char olist[5000]; // BOOL
} PLAY02_CLUSTERASTARSYS;
PLAY02_CLUSTERASTARSYS* play02_group_astar = NULL;
...
play02_group_astar = (PLAY02_CLUSTERASTARSYS*)sys_malloc( (int)m * sizeof(PLAY02_CLUSTERASTARSYS) );
memset( play02_group_astar , 0 , (int)m*sizeof(PLAY02_CLUSTERASTARSYS) );