Solved
Calculating the memory requirements for screens
Hello,
I want to calculate RAM requirement for one screen with some widgets and images.How can this be done.
Hello,
I want to calculate RAM requirement for one screen with some widgets and images.How can this be done.
Hi @ananya,
Here's a way of calculating the size of both worst case View (including widgets) + Presenter or just the size for any screen you want. Then you have some memory for OS / Heap potentially.
int main(int argc, char** argv)
{
....
// Print out size information
printf("*** Memory usage: ***\r\n");
printf("Largest view %lu\r\n", (long unsigned int) sizeof(FrontendHeap::MaxViewType));
printf("Largest presenter %lu\r\n", (long unsigned int) sizeof(FrontendHeap::MaxPresenterType));
printf("Datamodel %lu\r\n", (long unsigned int) sizeof(Model));
printf("Total: %lu\r\n", (long unsigned int) sizeof(FrontendHeap));
printf("*** Screens: ***\r\n");
printf("MyView%lu\r\n", (long unsigned int) sizeof(MyView));
...
}This code can be run in the simulator.cpp main() method.
/Martin
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.