mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
It turned out we used one version of kmalloc for malloc() and another for kfree()! Now fixed. Added parent-child relationship to tasks. Need to polish handling CLONE_PARENT and THREAD.
21 lines
316 B
C
21 lines
316 B
C
#ifndef __PRIVATE_MALLOC_H__
|
|
#define __PRIVATE_MALLOC_H__
|
|
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
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__ */
|