From a4fe1bb5d87bd6a16d64563238eb1bd33b9f05f4 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 29 Sep 2021 22:02:58 -0700 Subject: [PATCH] libstrat: uncomment some asserts --- .../source/fssystem/save/fssystem_buffered_storage.cpp | 2 +- .../source/lmem/impl/lmem_impl_common_heap.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/libstratosphere/source/fssystem/save/fssystem_buffered_storage.cpp b/libraries/libstratosphere/source/fssystem/save/fssystem_buffered_storage.cpp index 38f0c66c4..d8de70fcb 100644 --- a/libraries/libstratosphere/source/fssystem/save/fssystem_buffered_storage.cpp +++ b/libraries/libstratosphere/source/fssystem/save/fssystem_buffered_storage.cpp @@ -675,7 +675,7 @@ namespace ams::fssystem::save { R_TRY(cache.Flush()); cache.Invalidate(); } - /* AMS_ASSERT(!cache.AcquireNextOverlappedCache(invalidate_offset, invalidate_size)); */ + AMS_ASSERT(!cache.AcquireNextOverlappedCache(invalidate_offset, invalidate_size)); } } else if (size < prev_size) { /* Prepare to do a shrink. */ diff --git a/libraries/libstratosphere/source/lmem/impl/lmem_impl_common_heap.hpp b/libraries/libstratosphere/source/lmem/impl/lmem_impl_common_heap.hpp index 99018b642..6c2c5fa9e 100644 --- a/libraries/libstratosphere/source/lmem/impl/lmem_impl_common_heap.hpp +++ b/libraries/libstratosphere/source/lmem/impl/lmem_impl_common_heap.hpp @@ -68,8 +68,8 @@ namespace ams::lmem::impl { inline void FillMemory(void *dst, u32 fill_value, size_t size) { /* All heap blocks must be at least 32-bit aligned. */ - /* AMS_ASSERT(util::IsAligned(dst, 4)); */ - /* AMS_ASSERT(util::IsAligned(size, 4)); */ + AMS_ASSERT(util::IsAligned(reinterpret_cast(dst), alignof(u32))); + AMS_ASSERT(util::IsAligned(size, sizeof(u32))); for (size_t i = 0; i < size / sizeof(fill_value); i++) { reinterpret_cast(dst)[i] = fill_value; }