mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-14 00:56:35 +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();
|
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 a new issue