You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CHIP currently has a single ‘funnel’ for its own heap allocations (CHIPMem.h), which is in principle configurable at build time, but CHIP applications invariably include non-CHIP code. Some commonly used third party libraries include their own wrappers (e.g. mbedtls, openthread) but ensuring that all of these are configured appropriately is difficult (e.g. #5242) and does not guarantee that an application will not unknowingly use the malloc family via some language or third-party library.
The only common underlying interface is the malloc family. Popular linkers have a --wrap option that can be used to provide substitutes for these globally, regardless of origin. CHIP should support this so that building with a custom heap is simple and safe.
Proposed Solution
Pigweed has GN build support for this that we can imitate if not use directly.
The text was updated successfully, but these errors were encountered:
Problem
CHIP currently has a single ‘funnel’ for its own heap allocations (
CHIPMem.h
), which is in principle configurable at build time, but CHIP applications invariably include non-CHIP code. Some commonly used third party libraries include their own wrappers (e.g. mbedtls, openthread) but ensuring that all of these are configured appropriately is difficult (e.g. #5242) and does not guarantee that an application will not unknowingly use the malloc family via some language or third-party library.The only common underlying interface is the malloc family. Popular linkers have a
--wrap
option that can be used to provide substitutes for these globally, regardless of origin. CHIP should support this so that building with a custom heap is simple and safe.Proposed Solution
Pigweed has GN build support for this that we can imitate if not use directly.
The text was updated successfully, but these errors were encountered: