I write a program which need to allocate byte array in size of 8 mb. (I get file from the user and use it for burn on flash memory, I get the data from SD card or from network)
when I tried to implement it- I got “Out Of Memory” exception.
when I tried to understand the issues I thought about some question, that I would like some one answer me:
what size of memory is optional allocate for one variable?
what size of memory is optional allocate in one declaration statement?
what is the whole size of memory of the heap?-
what is the max size of the sum of the whole variables in the gadeteer?
what the action should be if I use more than the memory I can use- which exception, etc.?
and general question to all- what do you think is the right way to solve my problem?