fix: in `__mem_MERGE_MEM_NODES` `base->free = base->size`, its wrong. forgot to set size for new block optimization: add `__last_mem_node`. usually its node with max free space among other nodes. firstly `malloc` try find space in it. update(fix and optimizations) `realloc`. now sdltest is working!
13 lines
195 B
C
13 lines
195 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/ksys.h>
|
|
|
|
void abort()
|
|
{
|
|
ksys_thread_t t;
|
|
_ksys_thread_info(&t, -1);
|
|
fprintf(stderr, "\nAbort in %d\n", t.pid);
|
|
|
|
_exit(128);
|
|
}
|