forked from PoliEcho-holding-org/kern
basic heap scafolding
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef _KMALLOC_H
|
||||
#define _KMALLOC_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// This function allocates size bytes of contiguous memory.
|
||||
// Returns a pointer to allocated memory or NULL.
|
||||
void* kmalloc(size_t size);
|
||||
|
||||
// This function allocates size bytes of contiguous, zeroed-out memory.
|
||||
// Returns a pointer to allocated memory or NULL.
|
||||
void* kzalloc(size_t size);
|
||||
|
||||
// This function allocates memory for count elements each of size bytes, zeroed-out memory.
|
||||
// Returns a pointer to allocated memory or NULL.
|
||||
void* kcalloc(size_t count, size_t size);
|
||||
#endif
|
||||
Reference in New Issue
Block a user