feat: add lab-rv32i-c-smalloc-sbrk-libc card

This commit is contained in:
user
2026-07-21 19:14:20 +02:00
commit d522c15f75
33 changed files with 5965 additions and 0 deletions
+24
View File
@@ -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