feat: add lab-rv32i-c-smalloc-sbrk-libc card
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#ifndef C09_SMALLOC_H
|
||||
#define C09_SMALLOC_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
enum {
|
||||
C09_SMALLOC_ALIGNMENT = 16,
|
||||
C09_SMALLOC_HEADER_BYTES = 16,
|
||||
C09_SMALLOC_MAGIC = 0x534D414CU
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic;
|
||||
uint32_t requested_bytes;
|
||||
uint32_t reserved_bytes;
|
||||
uint32_t sequence;
|
||||
} C09SmallocInfo;
|
||||
|
||||
void c09_smalloc_reset(void);
|
||||
void *c09_smalloc(size_t requested_bytes);
|
||||
int c09_smalloc_inspect(const void *payload, C09SmallocInfo *result);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user