Rockbox Ports are now being developed for various digital audio players!
static int menu_find_free(void){ int i; /* Tries to find an unused slot to put the new menu */ for ( i=0; i if ( !inuse[i] ) { inuse[i] = true; break; } } if ( i == MAX_MENUS ) { DEBUGF("Out of menus!\n"); return -1; } return(i);}
There is no dynamic allocation of memory in the core in Rockbox.
You said your goal was to do things more dynamically by using dynamic memory allocation. You didn't make mention of adding it, so I wasn't sure you realized that it didn't exist within Rockbox.It has often been stated that it is not wanted within the core of Rockbox. Come into the IRC channel and ask about it, if you would like to try to argue the case before the main developers (assuming you can catch them online).
The problem with dynamic memory allocation is you need a pool of unused memory to allocate from.This conflicts with the desire to have as big an audio buffer as possible so the disk spins up as little as possible.The prevailing view is the memory pool would be near enough the same size as everything statically allocated and so the simplest method won.
Page created in 0.077 seconds with 21 queries.