summaryrefslogtreecommitdiff
path: root/other/Kermit/src/sys_malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'other/Kermit/src/sys_malloc.c')
-rw-r--r--other/Kermit/src/sys_malloc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/other/Kermit/src/sys_malloc.c b/other/Kermit/src/sys_malloc.c
new file mode 100644
index 0000000..96a3b4d
--- /dev/null
+++ b/other/Kermit/src/sys_malloc.c
@@ -0,0 +1,27 @@
1/*
2 * sys_malloc: system call for malloc'ing kernel memory
3 * written by palmers / teso
4 */
5#include <stdio.h>
6#include <pseudo_link.h>
7
8/* from linux/mm.h */
9#define __GFP_WAIT 0x01
10#define __GFP_MED 0x04
11#define __GFP_IO 0x10
12#define GFP_KERNEL (__GFP_MED | __GFP_WAIT | __GFP_IO)
13
14
15void cbegin (){}
16
17void *sys_malloc (size_t x) /* malloc x bytes */
18{
19 USE_KMALLOC
20 void *y = NULL;
21
22 y = kmalloc (x, GFP_KERNEL);
23 return y;
24}
25
26void cend(){}
27