[riot-notifications] [RIOT-OS/RIOT] pkg/tlsf: Fix the way system functions are overriden. (#12031)

benpicco notifications at github.com
Thu Sep 12 09:22:49 CEST 2019


Hm, I tested it again with `nucleo-l031k6` and `esp32-wroom-32`.
Now with `USEMODULE += tlsf-malloc` a different binary is generated for both platforms.

I remembered that without #12032 a manual initialization of the heap is needed, so I added
```diff
--- a/tests/malloc/main.c
+++ b/tests/malloc/main.c
@@ -70,8 +70,12 @@ void free_memory(struct node *head)
     }
 }
 
+#include "tlsf-malloc.h"
+static char heap[4096];
 int main(void)
 {
+    tlsf_add_global_pool(heap, sizeof(heap));
+
     while (1) {
         struct node *head = malloc(sizeof(struct node));
         total += sizeof(struct node);
```

But when I flash it, neither of the two boards will print anything.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12031#issuecomment-530700445
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190912/7c1ee527/attachment.htm>


More information about the notifications mailing list