Thanks a lot for responding both Brad and Salem.
I faced a similar problem in java where i ran out of memory and i fixed it by increasing heap size for the executing program
C:\Program Files\Weka-3-5>
java -Xmx512m -classpath "C:\Program Files\Java\j2re1.4.2_03\lib\ext\QTJava.zip;weka.ja r" weka.gui.GUIChooser
Once i launch my program through this command, it succesfully reads large microarray datasets.
Now coming to C program, it works for many medium datasets and real problem occurs when it faces a large dataset.
I did some debugging and found my code breaks at this function
Code:
//
// Creates a new row object
//
row *createrow ()
{
row *newrow;
if ((newrow = (row*)malloc(sizeof(row))) == NULL) {
printf("ERRORn: Unable to allocate memory!");
freeitems(item_list);
freetestitems(item_list_test);
freetree(tree);
exit(1);
}
newrow->no = 0;
newrow->next = NULL;
return newrow;
}
After processing the dataset for sometime ...prog stops at this line in my above code
Code:
printf("ERRORn: Unable to allocate memory!");
For smaller datasets it doesnot even come into this if condition....
Please let me know your thoughts..i am not good in C, Appreciate your help