Hi, Using the heap at run-time is generally discouraged as it leads to run-time failures and fragmented memory.
However, I think there is a case for dynamic allocation in init for memory that is never freed for the lifetime of the application.
E.g. collecting neighbor statistics only on the wireless interface if there is both a wireless and a wired one, or allocating a page cache on init that mirrors the size of a memory device that is only known at run-time.
Should we allow for
malloc() in RIOT modules in such cases?