commit | b0e690ac1e7d4a440b2374e14d2c4d831a7849d2 | [log] [tgz] |
---|---|---|
author | Stephanos Ioannidis <root@stephanos.io> | Wed May 12 23:27:12 2021 +0900 |
committer | Kumar Gala <kumar.gala@gmail.com> | Thu May 13 07:30:43 2021 -0500 |
tree | 6d5fcd254367114217dc83917c9d8180845dc9c5 | |
parent | f717ccd092e51ed41713735f28176f740c61d31f [diff] |
lib: newlib: Add malloc lock This commit adds a lock implementation for the newlib heap memory management functions (`malloc` and `free`). The `__malloc_lock` and `__malloc_unlock` functions are called by the newlib `malloc` and `free` functions to synchronise access to the heap region. Without this lock, making use of the `malloc` and `free` functions from multiple threads will result in the corruption of the heap region. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>