Skip to content

Memory manager to safely use malloc() from other libraries #9

Closed
@ppescher

Description

@ppescher

The current options in the portable/MemMang directory cannot provide thread safety for those Arduino libraries that directly call malloc() family of functions (e.g. STM32SD, String).

I have ported some code here: RoboTech-srl@897009a

Before making a PR, I was wondering if configMEMMANG_HEAP_NB == -1 was a good choice. I thought the number of heap implementations might grow in future versions, so I went negative. What do you think @fpistm ?

I also think that the default _sbrk() provided by the core must be defined as a "weak" symbol for this to work. See fortebit/fortebit-openiot-stm32-core@169ced0

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions