diff options
author | Stefan Reinauer <stepan@openbios.org> | 2006-08-22 13:21:39 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2006-08-22 13:21:39 +0000 |
commit | 60902ed3a1155f062a78baa5962ca7903ec1d621 (patch) | |
tree | a780c319d7a49e605a7748cccb7ac1696f66ff0b /util/extensions/legacybios/kernel/malloc.c | |
parent | 1ac1cf527d8d83a6eeffbd79c87a83d1ee59151c (diff) |
drop extensions directory. it has never been used.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2382 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/extensions/legacybios/kernel/malloc.c')
-rw-r--r-- | util/extensions/legacybios/kernel/malloc.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/util/extensions/legacybios/kernel/malloc.c b/util/extensions/legacybios/kernel/malloc.c deleted file mode 100644 index 782b516222..0000000000 --- a/util/extensions/legacybios/kernel/malloc.c +++ /dev/null @@ -1,35 +0,0 @@ - -// 32k heap - - -void printk(const char *fmt, ...); -#define error printk - -static unsigned long free_mem_ptr = 0x20000; /* Start of heap */ -static unsigned long free_mem_end_ptr = 0x28000; /* End of heap */ - - -void *malloc(unsigned int size) -{ - void *p; - - if (size < 0) - error("Error! malloc: Size < 0"); - if (free_mem_ptr <= 0) - error("Error! malloc: Free_mem_ptr <= 0"); - - free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ - - p = (void *) free_mem_ptr; - free_mem_ptr += size; - - if (free_mem_ptr >= free_mem_end_ptr) - error("Error! malloc: Free_mem_ptr >= free_mem_end_ptr"); - - return p; -} - -void free(void *where) -{ - /* Don't care */ -} |