removed unused and unimplemented malloc definitions

This commit is contained in:
Anton Lydike 2021-08-22 18:37:52 +02:00
parent c71ee1498c
commit 887056f141
2 changed files with 1 additions and 13 deletions

View File

@ -11,17 +11,8 @@ void malloc_init(malloc_info* given_info)
allocate_memory_end = given_info->allocate_memory_end;
}
optional_voidptr malloc(size_t size)
{
return (optional_voidptr) { .error = ENOMEM };
}
int free(void* ptr)
{
return EINVAL;
}
// allocate stack and return a pointer to the *end* of the allocated region
// this doesn't reuse stack from functions which exited
optional_voidptr malloc_stack(size_t size)
{
void* new_alloc_end = (void*) (((int) allocate_memory_end) - size);

View File

@ -8,9 +8,6 @@ typedef struct malloc_info {
void* allocate_memory_start;
} malloc_info;
optional_voidptr malloc(size_t size);
// int free(void* ptr);
optional_voidptr malloc_stack(size_t size);
void malloc_init(malloc_info* info);