Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration support for wrapping malloc-family #5345

Closed
kpschoedel opened this issue Mar 12, 2021 · 3 comments
Closed

Configuration support for wrapping malloc-family #5345

kpschoedel opened this issue Mar 12, 2021 · 3 comments
Labels
enhancement New feature or request future memory stale Stale issue or PR V1.X

Comments

@kpschoedel
Copy link
Contributor

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.

@kpschoedel kpschoedel added memory enhancement New feature or request labels Mar 12, 2021
@kpschoedel
Copy link
Contributor Author

@stale
Copy link

stale bot commented Sep 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Sep 16, 2022
@stale
Copy link

stale bot commented Oct 3, 2022

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future memory stale Stale issue or PR V1.X
Projects
None yet
Development

No branches or pull requests

2 participants