vxKernel/fake/kmalloc.c

36 lines
1.0 KiB
C

#include <stddef.h>
/* kmalloc(): Allocate memory in one of the available arenas
This function acts like malloc(). The second parameter specifies which arena
to allocate from; when NULL, all default arenas are considered.
@size Size of requested block
@arena_name Name of arena to allocate in (can be NULL)
Returns address of allocated block, NULL on error. */
void *kmalloc(size_t size, char const *arena_name)
{
(void)size;
(void)arena_name;
}
/* krealloc(): Reallocate memory
This function acts like realloc(). It only tries to reallocate the block in
the arena where it was previously allocated. Note that if NULL is returned,
the user needs to have a copy of the original address or the memory will
become unreachable.
@ptr Existing allocated block
@size New requested size for the block
Returns address of reallocated block, NULL on error. */
void *krealloc(void *ptr, size_t size)
{
(void)ptr;
(void)size;
}
/* kfree(): Free memory allocated with kalloc() */
void kfree(void *ptr)
{
(void)ptr;
}