2022-08-27 04:25:47 +00:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
2024-03-25 10:53:32 +00:00
|
|
|
void furi_hal_memory_init(void);
|
2022-08-27 04:25:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
2024-03-25 10:53:32 +00:00
|
|
|
size_t furi_hal_memory_get_free(void);
|
2022-08-27 04:25:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Get max free block size from memory pool
|
|
|
|
*
|
|
|
|
* @return size_t
|
|
|
|
*/
|
2024-03-25 10:53:32 +00:00
|
|
|
size_t furi_hal_memory_max_pool_block(void);
|
2022-08-27 04:25:47 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|