Files
codezero/containers/posix/fs0/include/lib/malloc.h
Bahadir Balban a41caeebd2 Created libc under containers/posix which now all tasks use to build.
There is a problem in the new libc that test0 now misbehaves. Going to be fixed.
2009-08-27 12:00:04 +03:00

26 lines
373 B
C

#ifndef __PRIVATE_MALLOC_H__
#define __PRIVATE_MALLOC_H__
#include <stddef.h>
#include <string.h>
#ifndef NULL
#define NULL 0
#endif
#ifndef size_t
#define size_t int
#endif
void *kmalloc(size_t size);
void kfree(void *blk);
static inline void *kzalloc(size_t size)
{
void *buf = kmalloc(size);
memset(buf, 0, size);
return buf;
}
#endif /*__PRIVATE_MALLOC_H__ */