If you think you are running out of RAM, try this:
extern UINT32 cfa_mm_MemFreeBytes(void);
// All other app initialization.
// Trace number of free bytes.
ble_trace1("Free RAM (bytes): %d\n", cfa_mm_MemFreeBytes());
cfa_mm_MemFreeBytes() returns the number of bytes free at the point of invocation. Calling it at the end of the app_create function will ensure that you get the real number of free bytes after all the initialization is done. So your app code can grow by at most these number of bytes (but perhaps less too because some callback registrations, interrupt handler registrations also take up some dynamic memory, but this will give you a very good idea of how large your app can be).