Browse Source

Fix PSRAM allocation safety and memory leaks

SybexXx 2 ngày trước cách đây
mục cha
commit
70658be5cf
1 tập tin đã thay đổi với 4 bổ sung và 0 xóa
  1. 4 0
      code/components/jomjol_helper/psram.h

+ 4 - 0
code/components/jomjol_helper/psram.h

@@ -20,4 +20,8 @@ void *malloc_psram_heap(std::string name, size_t size, uint32_t caps);
 void *realloc_psram_heap(std::string name, void *ptr, size_t size, uint32_t caps);
 void *calloc_psram_heap(std::string name, size_t n, size_t size, uint32_t caps);
 void free_psram_heap(std::string name, void *ptr);
+void *malloc_internal_heap(std::string name, size_t size, uint32_t caps = MALLOC_CAP_8BIT);
+void *realloc_internal_heap(std::string name, void *ptr, size_t size, uint32_t caps = MALLOC_CAP_8BIT);
+void *calloc_internal_heap(std::string name, size_t n, size_t size, uint32_t caps = MALLOC_CAP_8BIT);
+void free_internal_heap(std::string name, void *ptr);
 #endif // PSRAM_h