blob: e2d574f0c21b8d2e4a30fdac5013360387e40a9c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// MIT License, Copyright (c) 2020 Marvin Borner
#ifndef MEM_H
#define MEM_H
#include <def.h>
#define malloc(n) ((void *)((HEAP += n) - n)) // TODO: Implement real/better malloc/free
#define free(x)
// TODO: Use malloc as syscall
u32 HEAP;
u32 HEAP_START;
void *memcpy(void *dst, const void *src, u32 n);
void *memset(void *dst, int c, u32 n);
int memcmp(const void *s1, const void *s2, u32 n);
#endif
|