diff --git a/stratosphere/ams_mitm/source/amsmitm_main.cpp b/stratosphere/ams_mitm/source/amsmitm_main.cpp index 3b914a755..ce57c7db1 100644 --- a/stratosphere/ams_mitm/source/amsmitm_main.cpp +++ b/stratosphere/ams_mitm/source/amsmitm_main.cpp @@ -38,8 +38,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -110,12 +111,16 @@ void __appExit(void) { fsExit(); } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } int main(int argc, char **argv) { diff --git a/stratosphere/boot/source/boot_main.cpp b/stratosphere/boot/source/boot_main.cpp index 677bbf646..2bf22a8ab 100644 --- a/stratosphere/boot/source/boot_main.cpp +++ b/stratosphere/boot/source/boot_main.cpp @@ -49,8 +49,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -160,12 +161,16 @@ namespace ams { } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } void *operator new(size_t size) { diff --git a/stratosphere/boot2/source/boot2_main.cpp b/stratosphere/boot2/source/boot2_main.cpp index 522e95a83..869453149 100644 --- a/stratosphere/boot2/source/boot2_main.cpp +++ b/stratosphere/boot2/source/boot2_main.cpp @@ -33,6 +33,10 @@ extern "C" { alignas(16) u8 __nx_exception_stack[ams::os::MemoryPageSize]; u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); + + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -137,6 +141,18 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); +} + +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); +} + int main(int argc, char **argv) { /* Set thread name. */ diff --git a/stratosphere/creport/source/creport_main.cpp b/stratosphere/creport/source/creport_main.cpp index e00dd1c35..57fa0dbe8 100644 --- a/stratosphere/creport/source/creport_main.cpp +++ b/stratosphere/creport/source/creport_main.cpp @@ -36,6 +36,10 @@ extern "C" { alignas(16) u8 __nx_exception_stack[ams::os::MemoryPageSize]; u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); + + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -126,6 +130,18 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); +} + +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); +} + namespace { constinit creport::CrashReport g_crash_report; diff --git a/stratosphere/dmnt/source/dmnt_main.cpp b/stratosphere/dmnt/source/dmnt_main.cpp index 2070a672c..06c17c385 100644 --- a/stratosphere/dmnt/source/dmnt_main.cpp +++ b/stratosphere/dmnt/source/dmnt_main.cpp @@ -32,8 +32,9 @@ extern "C" { void __appInit(void); void __appExit(void); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -175,12 +176,16 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } int main(int argc, char **argv) diff --git a/stratosphere/erpt/source/erpt_main.cpp b/stratosphere/erpt/source/erpt_main.cpp index a65195dfe..5f8a72252 100644 --- a/stratosphere/erpt/source/erpt_main.cpp +++ b/stratosphere/erpt/source/erpt_main.cpp @@ -34,9 +34,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); - + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -145,12 +145,16 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } int main(int argc, char **argv) diff --git a/stratosphere/fatal/source/fatal_main.cpp b/stratosphere/fatal/source/fatal_main.cpp index 223119eaf..40c63975d 100644 --- a/stratosphere/fatal/source/fatal_main.cpp +++ b/stratosphere/fatal/source/fatal_main.cpp @@ -41,8 +41,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -191,12 +192,16 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } int main(int argc, char **argv) diff --git a/stratosphere/loader/source/ldr_main.cpp b/stratosphere/loader/source/ldr_main.cpp index 18009d109..284ce33d8 100644 --- a/stratosphere/loader/source/ldr_main.cpp +++ b/stratosphere/loader/source/ldr_main.cpp @@ -36,8 +36,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -188,12 +189,16 @@ void operator delete(void *p) { return ldr::Deallocate(p, 0); } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } int main(int argc, char **argv) diff --git a/stratosphere/ncm/source/ncm_main.cpp b/stratosphere/ncm/source/ncm_main.cpp index 6adaf7164..39a6e2c7d 100644 --- a/stratosphere/ncm/source/ncm_main.cpp +++ b/stratosphere/ncm/source/ncm_main.cpp @@ -34,8 +34,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -124,12 +125,16 @@ namespace ams { } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } void *operator new(size_t size) { diff --git a/stratosphere/pgl/source/pgl_main.cpp b/stratosphere/pgl/source/pgl_main.cpp index 9c0ac7b6d..1126d82c8 100644 --- a/stratosphere/pgl/source/pgl_main.cpp +++ b/stratosphere/pgl/source/pgl_main.cpp @@ -34,8 +34,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -172,12 +173,16 @@ void operator delete(void *p) { return pgl::Deallocate(p, 0); } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } int main(int argc, char **argv) diff --git a/stratosphere/pm/source/pm_main.cpp b/stratosphere/pm/source/pm_main.cpp index 8f6dc8352..11bf6dbd8 100644 --- a/stratosphere/pm/source/pm_main.cpp +++ b/stratosphere/pm/source/pm_main.cpp @@ -39,8 +39,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); - void *__libnx_thread_alloc(size_t size); - void __libnx_thread_free(void *mem); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -239,12 +240,16 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } -void *__libnx_thread_alloc(size_t size) { - AMS_ABORT("__libnx_thread_alloc was called"); +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); } -void __libnx_thread_free(void *mem) { - AMS_ABORT("__libnx_thread_free was called"); +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); } int main(int argc, char **argv) diff --git a/stratosphere/ro/source/ro_main.cpp b/stratosphere/ro/source/ro_main.cpp index e669a1789..3cd4b900f 100644 --- a/stratosphere/ro/source/ro_main.cpp +++ b/stratosphere/ro/source/ro_main.cpp @@ -30,6 +30,10 @@ extern "C" { void __libnx_initheap(void); void __appInit(void); void __appExit(void); + + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -190,6 +194,18 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); +} + +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); +} + int main(int argc, char **argv) { /* Set thread name. */ diff --git a/stratosphere/sm/source/sm_main.cpp b/stratosphere/sm/source/sm_main.cpp index e03ae38ee..14c8ae7b3 100644 --- a/stratosphere/sm/source/sm_main.cpp +++ b/stratosphere/sm/source/sm_main.cpp @@ -38,6 +38,9 @@ extern "C" { u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -129,6 +132,18 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); +} + +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); +} + int main(int argc, char **argv) { /* Set thread name. */ diff --git a/stratosphere/spl/source/spl_main.cpp b/stratosphere/spl/source/spl_main.cpp index 40275d122..e24a35deb 100644 --- a/stratosphere/spl/source/spl_main.cpp +++ b/stratosphere/spl/source/spl_main.cpp @@ -43,6 +43,10 @@ extern "C" { alignas(16) u8 __nx_exception_stack[ams::os::MemoryPageSize]; u64 __nx_exception_stack_size = sizeof(__nx_exception_stack); void __libnx_exception_handler(ThreadExceptionDump *ctx); + + void *__libnx_alloc(size_t size); + void *__libnx_aligned_alloc(size_t alignment, size_t size); + void __libnx_free(void *mem); } namespace ams { @@ -190,6 +194,18 @@ void operator delete(void *p) { AMS_ABORT("operator delete(void *) was called"); } +void *__libnx_alloc(size_t size) { + AMS_ABORT("__libnx_alloc was called"); +} + +void *__libnx_aligned_alloc(size_t alignment, size_t size) { + AMS_ABORT("__libnx_aligned_alloc was called"); +} + +void __libnx_free(void *mem) { + AMS_ABORT("__libnx_free was called"); +} + int main(int argc, char **argv) { /* Set thread name. */