mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-27 13:32:43 +02:00
fs: allocations with mutex held must be unsafe
This commit is contained in:
parent
5b4528214f
commit
2fd560c7d1
@ -97,9 +97,9 @@ namespace ams::fs {
|
|||||||
Impl::LockAllocatorMutex();
|
Impl::LockAllocatorMutex();
|
||||||
|
|
||||||
/* Check that we can allocate memory (using overestimate of 0x80 + sizeof(T)). */
|
/* Check that we can allocate memory (using overestimate of 0x80 + sizeof(T)). */
|
||||||
if (auto * const p = Impl::Allocate(0x80 + sizeof(T)); AMS_LIKELY(p != nullptr)) {
|
if (auto * const p = Impl::AllocateUnsafe(0x80 + sizeof(T)); AMS_LIKELY(p != nullptr)) {
|
||||||
/* Free the memory we allocated. */
|
/* Free the memory we allocated. */
|
||||||
Impl::Deallocate(p, 0x80 + sizeof(T));
|
Impl::DeallocateUnsafe(p, 0x80 + sizeof(T));
|
||||||
|
|
||||||
/* Get allocator type. */
|
/* Get allocator type. */
|
||||||
using AllocatorType = AllocatorTemplateT<T, Impl>;
|
using AllocatorType = AllocatorTemplateT<T, Impl>;
|
||||||
|
Loading…
Reference in New Issue
Block a user