repo.or.cz
/
thunix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Makefile cleaup
[thunix.git]
/
include
/
malloc.h
blob
f72d5bec1676a54493409d0b95954d96321f84e6
1
#ifndef FSTK_MALLOC_H
2
#define FSTK_MALLOC_H
3
4
#include <stdio.h>
5
6
/* The memory managemant structure */
7
struct
mem_struct
{
8
struct
mem_struct
*
prev
;
9
int
size
;
10
int
free
;
11
};
12
13
void
malloc_init
(
void
);
14
void
*
malloc
(
int
);
15
void
free
(
void
*);
16
void
check_mem
(
void
);
17
18
static
inline
void
malloc_error
(
char
*
obj
)
19
{
20
printk
(
"malloc error: can't allocate memory for %s
\n
"
,
obj
);
21
check_mem
();
22
}
23
24
25
#endif
/* malloc.h */