diff --git a/stratosphere/ams_mitm/source/amsmitm_main.cpp b/stratosphere/ams_mitm/source/amsmitm_main.cpp index 3b914a7..ce57c7d 100644 --- a/stratosphere/ams_mitm/source/amsmitm_main.cpp +++ b/stratosphere/ams_mitm/source/amsmitm_main.cpp @@ -38,8 +38,9 @@ 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 @@ 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 677bbf6..2bf22a8 100644 --- a/stratosphere/boot/source/boot_main.cpp +++ b/stratosphere/boot/source/boot_main.cpp @@ -49,8 +49,9 @@ 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 @@ } -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 522e95a..8694531 100644 --- a/stratosphere/boot2/source/boot2_main.cpp +++ b/stratosphere/boot2/source/boot2_main.cpp @@ -33,6 +33,10 @@ 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 @@ 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 e00dd1c..57fa0db 100644 --- a/stratosphere/creport/source/creport_main.cpp +++ b/stratosphere/creport/source/creport_main.cpp @@ -36,6 +36,10 @@ 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 @@ 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 2070a67..06c17c3 100644 --- a/stratosphere/dmnt/source/dmnt_main.cpp +++ b/stratosphere/dmnt/source/dmnt_main.cpp @@ -32,8 +32,9 @@ 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 @@ 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 a65195d..5f8a722 100644 --- a/stratosphere/erpt/source/erpt_main.cpp +++ b/stratosphere/erpt/source/erpt_main.cpp @@ -34,9 +34,9 @@ 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 @@ 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 223119e..40c6397 100644 --- a/stratosphere/fatal/source/fatal_main.cpp +++ b/stratosphere/fatal/source/fatal_main.cpp @@ -41,8 +41,9 @@ 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 @@ 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 18009d1..284ce33 100644 --- a/stratosphere/loader/source/ldr_main.cpp +++ b/stratosphere/loader/source/ldr_main.cpp @@ -36,8 +36,9 @@ 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 @@ 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 6adaf71..39a6e2c 100644 --- a/stratosphere/ncm/source/ncm_main.cpp +++ b/stratosphere/ncm/source/ncm_main.cpp @@ -34,8 +34,9 @@ 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 @@ } -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 9c0ac7b..1126d82 100644 --- a/stratosphere/pgl/source/pgl_main.cpp +++ b/stratosphere/pgl/source/pgl_main.cpp @@ -34,8 +34,9 @@ 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 @@ 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 8f6dc83..11bf6db 100644 --- a/stratosphere/pm/source/pm_main.cpp +++ b/stratosphere/pm/source/pm_main.cpp @@ -39,8 +39,9 @@ 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 @@ 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 e669a17..3cd4b90 100644 --- a/stratosphere/ro/source/ro_main.cpp +++ b/stratosphere/ro/source/ro_main.cpp @@ -30,6 +30,10 @@ 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 @@ 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 e03ae38..14c8ae7 100644 --- a/stratosphere/sm/source/sm_main.cpp +++ b/stratosphere/sm/source/sm_main.cpp @@ -38,6 +38,9 @@ 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 @@ 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 40275d1..e24a35d 100644 --- a/stratosphere/spl/source/spl_main.cpp +++ b/stratosphere/spl/source/spl_main.cpp @@ -43,6 +43,10 @@ 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 @@ 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. */