a C standard library for fx Casio calculators
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
fxlibc/src/libc/stdlib/target/vhex-sh/malloc.c

12 lines
212 B

#include <stdlib.h>
#include <errno.h>
extern void *kmalloc(size_t size, char const *arena_name);
void *malloc(size_t size)
{
void *ptr = kmalloc(size, NULL);
if(ptr == NULL)
errno = ENOMEM;
return ptr;
}