|
|
@@ -23,7 +23,15 @@
|
|
|
#include <stdint.h>
|
|
|
#include <stdbool.h>
|
|
|
#include <string.h>
|
|
|
-#include <inttypes.h>
|
|
|
+
|
|
|
+//--------------------------------
|
|
|
+//#include <inttypes.h>
|
|
|
+#include "luat_malloc.h"
|
|
|
+#define LFS_NO_ASSERT 1
|
|
|
+#define LFS_NO_DEBUG 1
|
|
|
+#define LFS_NO_WARN 1
|
|
|
+#define LFS_NO_ERROR 1
|
|
|
+//--------------------------------
|
|
|
|
|
|
#ifndef LFS_NO_MALLOC
|
|
|
#include <stdlib.h>
|
|
|
@@ -205,7 +213,7 @@ uint32_t lfs_crc(uint32_t crc, const void *buffer, size_t size);
|
|
|
// Note, memory must be 64-bit aligned
|
|
|
static inline void *lfs_malloc(size_t size) {
|
|
|
#ifndef LFS_NO_MALLOC
|
|
|
- return malloc(size);
|
|
|
+ return luat_heap_malloc(size);
|
|
|
#else
|
|
|
(void)size;
|
|
|
return NULL;
|
|
|
@@ -215,7 +223,7 @@ static inline void *lfs_malloc(size_t size) {
|
|
|
// Deallocate memory, only used if buffers are not provided to littlefs
|
|
|
static inline void lfs_free(void *p) {
|
|
|
#ifndef LFS_NO_MALLOC
|
|
|
- free(p);
|
|
|
+ luat_heap_free(p);
|
|
|
#else
|
|
|
(void)p;
|
|
|
#endif
|