[FL-1906] Documentation: add Doxyfile, prepare sources for doxygen. (#741)
* Documentation: add Doxyfile, prepare sources for doxygen. * Update ReadMe and remove obsolete CLA * Add contribution guide * Contributing: update text * Correct spelling
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @file memmgr.h
|
||||
* Furi: memory managment API and glue
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
@@ -12,14 +17,27 @@ extern "C" {
|
||||
// define for test case "link against furi memmgr"
|
||||
#define FURI_MEMMGR_GUARD 1
|
||||
|
||||
/** Get free heap size
|
||||
*
|
||||
* @return free heap size in bytes
|
||||
*/
|
||||
size_t memmgr_get_free_heap(void);
|
||||
|
||||
/** Get heap watermark
|
||||
*
|
||||
* @return minimum heap in bytes
|
||||
*/
|
||||
size_t memmgr_get_minimum_free_heap(void);
|
||||
|
||||
inline static void* furi_alloc(size_t size) {
|
||||
void* p = malloc(size);
|
||||
furi_check(p);
|
||||
return memset(p, 0, size);
|
||||
}
|
||||
/** Allocate memory from heap
|
||||
*
|
||||
* @note performs memset with 0, will crash system if not enough memory
|
||||
*
|
||||
* @param[in] size bytes to allocate
|
||||
*
|
||||
* @return pointer to allocated memory
|
||||
*/
|
||||
void* furi_alloc(size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user