feat: rebuild heap4 card around upstream FreeRTOS allocator
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef HEAP4_MODEL_H
|
||||
#define HEAP4_MODEL_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define MODEL_ALIGNMENT ((size_t)8U)
|
||||
|
||||
typedef struct ModelBlock ModelBlock;
|
||||
|
||||
struct ModelBlock {
|
||||
ModelBlock *next;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
static inline size_t model_align_up(size_t value)
|
||||
{
|
||||
return (value + MODEL_ALIGNMENT - 1U) & ~(MODEL_ALIGNMENT - 1U);
|
||||
}
|
||||
|
||||
#if defined(HOST_PRINTF)
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user