Commit Graph

10 Commits (9c029bfc089917c85ab3cd0c17fa649e979140b9)

Author SHA1 Message Date
Lingkai Dong 8d32b668ec Workaround for a bug in malloc() from newlib-nano 4.1.0
The commit 84d0689 "Nano-malloc: Fix for unwanted external heap
fragmentation" from newlib 4.1.0 introduced several optimizations,
one of which is as follows:

When the last chunk in the free list is smaller than requested,
nano_malloc() calls sbrk(0) to see if the heap's current head is
adjacent to this chunk, and if so it asks sbrk() to allocate the
difference in bytes only and expands the current chunk.

This doesn't work if the heap consists of non-contiguous regions.
sbrk(0) returns the the current region's head if the region has any
remaining capacity. But if this capacity is not enough for the second
(non-trivial) call to sbrk() described above, allocation will happen
from the next region if available. Expanding the current chunk won't
work and will result in a segmentation fault.

So this optimization needs to be reverted in order to bring back
compatibility with non-contiguous heaps. Before the next version
of newlib becomes available and gets updated in the GCC Arm Embedded
Toolchain, we work around this issue by including the fix in Mbed OS.
The linker prioritizes malloc() from the project to the one from the
toolchain.
2021-09-01 17:21:32 +01:00
Hari Limaye 6440546b74 Style: Remove drivers unit test directory from codeignore
Unit tests for drivers are currently not checked for style compliance.
We should be checking coding style in unit tests, so we remove them from
the .codecheckignore file.
2021-08-16 10:13:11 +01:00
pennam f36c404218 Add connectivity/drivers/wifi/COMPONENT_WHD to ignore list 2021-05-18 17:20:31 +02:00
George Psimenos 3af96247a6 Update PinNames markers 2021-03-18 17:01:54 +00:00
George Psimenos 885cdef5f7 Add standard pin-names validation script & tests 2021-03-18 17:01:53 +00:00
Lingkai Dong 71eecfc7c8 .codecheckignore: ignore imported libraries randlib and mbed-trace 2020-09-02 12:31:00 +01:00
Martin Kojtal 9073a48667
Merge pull request #13489 from rajkan01/hal_directory_restructuring
Refactor hal directory
2020-09-02 12:10:42 +01:00
Rajkumar Kanagaraj fafa0c41ed Update UNITTESTS header reference 2020-08-25 16:06:56 +01:00
Rajkumar Kanagaraj 118c01016b Move FEATURE_EXPERIMENTAL_API for PSA to platform 2020-08-21 14:35:10 +01:00
Lingkai Dong e00d6feb37 Rename .astyleignore -> .codecheckignore for spell check 2020-08-20 17:16:02 +01:00