Implement user space's printf stuff
[thunix.git] / include / malloc.h
blobf72d5bec1676a54493409d0b95954d96321f84e6
1 #ifndef FSTK_MALLOC_H
2 #define FSTK_MALLOC_H
4 #include <stdio.h>
6 /* The memory managemant structure */
7 struct mem_struct {
8 struct mem_struct *prev;
9 int size;
10 int free;
13 void malloc_init(void);
14 void *malloc(int);
15 void free(void *);
16 void check_mem(void);
18 static inline void malloc_error(char *obj)
20 printk("malloc error: can't allocate memory for %s\n", obj);
21 check_mem();
25 #endif /* malloc.h */