2023-04-26 06:53:52 +02:00
|
|
|
--- ./littlefs/littlefs/lfs_util.h 2022-11-11 03:32:30.000000000 +1100
|
|
|
|
+++ ./littlefs/littlefs/lfs_util.h 2023-04-21 12:25:27.987084276 +1000
|
2024-09-09 14:28:16 +02:00
|
|
|
@@ -28,6 +28,8 @@
|
2023-04-26 06:53:52 +02:00
|
|
|
|
|
|
|
#ifndef LFS_NO_MALLOC
|
|
|
|
#include <stdlib.h>
|
|
|
|
+#include <nuttx/mm/mm.h>
|
2024-09-09 14:28:16 +02:00
|
|
|
+#include "fs_heap.h"
|
2023-04-26 06:53:52 +02:00
|
|
|
#endif
|
|
|
|
#ifndef LFS_NO_ASSERT
|
|
|
|
#include <assert.h>
|
|
|
|
@@ -218,7 +219,7 @@
|
|
|
|
// Note, memory must be 64-bit aligned
|
|
|
|
static inline void *lfs_malloc(size_t size) {
|
|
|
|
#ifndef LFS_NO_MALLOC
|
|
|
|
- return malloc(size);
|
2024-09-09 14:28:16 +02:00
|
|
|
+ return fs_heap_malloc(size);
|
2023-04-26 06:53:52 +02:00
|
|
|
#else
|
|
|
|
(void)size;
|
|
|
|
return NULL;
|
|
|
|
@@ -228,7 +229,7 @@
|
|
|
|
// Deallocate memory, only used if buffers are not provided to littlefs
|
|
|
|
static inline void lfs_free(void *p) {
|
|
|
|
#ifndef LFS_NO_MALLOC
|
|
|
|
- free(p);
|
2024-09-09 14:28:16 +02:00
|
|
|
+ fs_heap_free(p);
|
2023-04-26 06:53:52 +02:00
|
|
|
#else
|
|
|
|
(void)p;
|
|
|
|
#endif
|