Speedup SD card & enlarge your RAM. (#1649)
* FuriHal: sram2 memory manager * FuriHal: sram2 memory allocator * FuriHal: allow NULL buffers for txrx in spi hal * SD card: sector cache * FuriHal: fix init in memory hal * RPC: STARTUP instead SERVICE * Memory: pool "free" command * Thread: service can be statically allocated in a memory pool Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
44
firmware/targets/furi_hal_include/furi_hal_memory.h
Normal file
44
firmware/targets/furi_hal_include/furi_hal_memory.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @file furi_hal_memory.h
|
||||
* Memory HAL API
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Init memory pool manager
|
||||
*/
|
||||
void furi_hal_memory_init();
|
||||
|
||||
/**
|
||||
* @brief Allocate memory from separate memory pool. That memory can't be freed.
|
||||
*
|
||||
* @param size
|
||||
* @return void*
|
||||
*/
|
||||
void* furi_hal_memory_alloc(size_t size);
|
||||
|
||||
/**
|
||||
* @brief Get free memory pool size
|
||||
*
|
||||
* @return size_t
|
||||
*/
|
||||
size_t furi_hal_memory_get_free();
|
||||
|
||||
/**
|
||||
* @brief Get max free block size from memory pool
|
||||
*
|
||||
* @return size_t
|
||||
*/
|
||||
size_t furi_hal_memory_max_pool_block();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user