Files
lab-rv32i-freertos-heap4/src/tasks/heap4_model.h
T

26 lines
409 B
C

#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