removed unused and unimplemented malloc definitions
This commit is contained in:
parent
c71ee1498c
commit
887056f141
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user