mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-11 16:40:17 +00:00
Introduce mg_calloc
This commit is contained in:
1 parent
5f1f4a0df8
commit
074ef5197b
26 files changed
+259
-313
No files matched your search
+5
-4
@@ -25,10 +25,11 @@
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
#define calloc(a, b) mg_calloc(a, b)
|
||||
#define free(a) vPortFree(a)
|
||||
#define malloc(a) pvPortMalloc(a)
|
||||
#define strdup(s) ((char *) mg_strdup(mg_str(s)).buf)
|
||||
#define MG_ENABLE_CUSTOM_CALLOC 1
|
||||
|
||||
static inline void mg_free(void *ptr) {
|
||||
vPortFree(ptr);
|
||||
}
|
||||
|
||||
// Re-route calloc/free to the FreeRTOS's functions, don't use stdlib
|
||||
static inline void *mg_calloc(size_t cnt, size_t size) {
|
||||
|
||||
Reference in new issue
Block a user