mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-22 18:32:05 +00:00
fs: allocations with mutex held must be unsafe
This commit is contained in:
parent
64b4cc25fc
commit
f3dbdc2391
1 changed files with 2 additions and 2 deletions
|
@ -97,9 +97,9 @@ namespace ams::fs {
|
|||
Impl::LockAllocatorMutex();
|
||||
|
||||
/* 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. */
|
||||
Impl::Deallocate(p, 0x80 + sizeof(T));
|
||||
Impl::DeallocateUnsafe(p, 0x80 + sizeof(T));
|
||||
|
||||
/* Get allocator type. */
|
||||
using AllocatorType = AllocatorTemplateT<T, Impl>;
|
||||
|
|
Loading…
Reference in a new issue