mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 17:53:13 +01:00
Mixed changes
- Added automatic utcb map/prefaulting of forked tasks for fs0 so that it does not need to explicitly request those tasks from mm0. Eliminating fs0 requests to mm0 reduce deadlock possibilities. - Replaced kmalloc with a public malloc implementation because of a bug in kmalloc. - Fixed a kfree bug. default_release_pages was trying to free page_array pages.
This commit is contained in:
19
tasks/mm0/include/lib/malloc.h
Normal file
19
tasks/mm0/include/lib/malloc.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef __PRIVATE_MALLOC_H__
|
||||
#define __PRIVATE_MALLOC_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.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__ */
|
||||
Reference in New Issue
Block a user