nxp-mcuxpresso / rpmsg-lite

RPMsg implementation for small MCUs
BSD 3-Clause "New" or "Revised" License
238 stars 73 forks source link

configSUPPORT_STATIC_ALLOCATION vs RL_USE_STATIC_API => RL_USE_STATIC_API is not entirely static #13

Closed Hadatko closed 3 years ago

Hadatko commented 3 years ago

Hi @MichalPrincNXP , i wanted to inform you that i am working on STATIC memory usage in RPMSG. This macro RL_USE_STATIC_API isn't from may point of view best approach. In description:

//! @def RL_USE_STATIC_API
//!
//! Static API functions (no dynamic allocation) enabled/disabled.
//! The default value is 0 (static API disabled).
#define RL_USE_STATIC_API (1)

But RPMSG for FREERTOS is using dynamic memory allocations. So it is not entirely static api.

I am preparing PR where Freertos static functions can be called instead of dynamic when #define configSUPPORT_STATIC_ALLOCATION 1.

But i wanted let you think about this case until that. Because then user will need set two macros to get entirely static api usage and that doesn't sounds good to me.

EDIT: Maybe i can check if configSUPPORT_STATIC_ALLOCATION == RL_USE_STATIC_API and force user to set both macros.