CCArray or normal array with 300000 elements make app crash

hi all, i’m new to android development.
i have a array of strings, first i have tryed with

char buf[300000][30];

but the app crashes, so i have tried with

   std::vector array(300000);

but crashes however.
if i make in iphone the app goes well.
how can i manage an array so big?
thanks

Try splitting it to several arrays.
Maybe the OS cannot handle such a big consecutive memory allocation.

ok i’ll try. thanks

I think you should allocate memory on the heap rather than the stack.