diff --git a/libraries/libstratosphere/include/stratosphere/fs/impl/fs_newable.hpp b/libraries/libstratosphere/include/stratosphere/fs/impl/fs_newable.hpp index c0bf8d001..ac7bc439e 100644 --- a/libraries/libstratosphere/include/stratosphere/fs/impl/fs_newable.hpp +++ b/libraries/libstratosphere/include/stratosphere/fs/impl/fs_newable.hpp @@ -20,23 +20,23 @@ namespace ams::fs::impl { class Newable { public: - static void *operator new(size_t size) { + static ALWAYS_INLINE void *operator new(size_t size) noexcept { return ::ams::fs::impl::Allocate(size); } - static void *operator new(size_t size, Newable *placement) { + static ALWAYS_INLINE void *operator new(size_t size, Newable *placement) noexcept { return placement; } - static void *operator new[](size_t size) { + static ALWAYS_INLINE void *operator new[](size_t size) noexcept { return ::ams::fs::impl::Allocate(size); } - static void operator delete(void *ptr, size_t size) { + static ALWAYS_INLINE void operator delete(void *ptr, size_t size) noexcept { return ::ams::fs::impl::Deallocate(ptr, size); } - static void operator delete[](void *ptr, size_t size) { + static ALWAYS_INLINE void operator delete[](void *ptr, size_t size) noexcept { return ::ams::fs::impl::Deallocate(ptr, size); } }; diff --git a/libraries/libstratosphere/include/stratosphere/fssystem/buffers/fssystem_file_system_buffer_manager.hpp b/libraries/libstratosphere/include/stratosphere/fssystem/buffers/fssystem_file_system_buffer_manager.hpp index 507fe6803..e6c37b66b 100644 --- a/libraries/libstratosphere/include/stratosphere/fssystem/buffers/fssystem_file_system_buffer_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/fssystem/buffers/fssystem_file_system_buffer_manager.hpp @@ -106,11 +106,9 @@ namespace ams::fssystem { using Newable::operator new; using Newable::operator delete; - static void *operator new(size_t, void *p) { - return p; - } - static void operator delete(void *, size_t, void*) { /* ... */ } + static ALWAYS_INLINE void *operator new(size_t, void *p) noexcept { return p; } + static ALWAYS_INLINE void operator delete(void *, size_t, void*) noexcept { /* ... */ } }; using AttrListTraits = util::IntrusiveListBaseTraits; diff --git a/libraries/libstratosphere/source/erpt/srv/erpt_srv_allocator.hpp b/libraries/libstratosphere/source/erpt/srv/erpt_srv_allocator.hpp index f92e1d4de..4f7e0dec8 100644 --- a/libraries/libstratosphere/source/erpt/srv/erpt_srv_allocator.hpp +++ b/libraries/libstratosphere/source/erpt/srv/erpt_srv_allocator.hpp @@ -22,13 +22,13 @@ namespace ams::erpt::srv { class Allocator { public: - void *operator new(size_t sz) { return lmem::AllocateFromExpHeap(g_heap_handle, sz); } - void *operator new(size_t sz, size_t algn) { return lmem::AllocateFromExpHeap(g_heap_handle, sz, static_cast(algn)); } - void *operator new[](size_t sz) { return lmem::AllocateFromExpHeap(g_heap_handle, sz); } - void *operator new[](size_t sz, size_t algn) { return lmem::AllocateFromExpHeap(g_heap_handle, sz, static_cast(algn)); } + void *operator new(size_t sz) noexcept { return lmem::AllocateFromExpHeap(g_heap_handle, sz); } + void *operator new(size_t sz, size_t algn) noexcept { return lmem::AllocateFromExpHeap(g_heap_handle, sz, static_cast(algn)); } + void *operator new[](size_t sz) noexcept { return lmem::AllocateFromExpHeap(g_heap_handle, sz); } + void *operator new[](size_t sz, size_t algn) noexcept { return lmem::AllocateFromExpHeap(g_heap_handle, sz, static_cast(algn)); } - void operator delete(void *p) { lmem::FreeToExpHeap(g_heap_handle, p); } - void operator delete[](void *p) { lmem::FreeToExpHeap(g_heap_handle, p); } + void operator delete(void *p) noexcept { lmem::FreeToExpHeap(g_heap_handle, p); } + void operator delete[](void *p) noexcept { lmem::FreeToExpHeap(g_heap_handle, p); } }; inline void *Allocate(size_t sz) {