mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-10 13:49:25 +01:00
26ac7b3ff2
- Added (dummy) __init/fini_wut_malloc stubs called by wutcrt in order to ensure that wutmalloc gets linked in - malloc/realloc/calloc now properly set errno to ENOMEM during failure - realloc no longer fails if ptr==NULL (in this case it works like a regular malloc) - realloc no longer does an out of bounds copy if the new size is smaller than the old size - free(NULL) is now supported as per the C standard - Disabled sbrk/malloc-lock support code in wutnewlib because newlib's malloc is replaced with wutmalloc
28 lines
503 B
C
28 lines
503 B
C
void __init_wut_malloc();
|
|
void __init_wut_newlib();
|
|
void __init_wut_stdcpp();
|
|
void __init_wut_devoptab();
|
|
|
|
void __fini_wut_malloc();
|
|
void __fini_wut_newlib();
|
|
void __fini_wut_stdcpp();
|
|
void __fini_wut_devoptab();
|
|
|
|
void __attribute__((weak))
|
|
__init_wut()
|
|
{
|
|
__init_wut_malloc();
|
|
__init_wut_newlib();
|
|
//__init_wut_stdcpp();
|
|
__init_wut_devoptab();
|
|
}
|
|
|
|
void __attribute__((weak))
|
|
__fini_wut()
|
|
{
|
|
__fini_wut_devoptab();
|
|
//__fini_wut_stdcpp();
|
|
__fini_wut_newlib();
|
|
__fini_wut_malloc();
|
|
}
|