mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-10 17:01:17 +12:00
nn_fp: Multiple fixes
This commit is contained in:
parent
b0a7fd4e07
commit
f3c95f72e7
3 changed files with 18 additions and 8 deletions
|
@ -489,6 +489,11 @@ private:
|
|||
|
||||
bool _alloc(uint32 size, uint32 alignment, uint32& allocOffsetOut)
|
||||
{
|
||||
if(size == 0)
|
||||
{
|
||||
size = 1; // zero-sized allocations are not supported
|
||||
cemu_assert_suspicious();
|
||||
}
|
||||
// find smallest bucket to scan
|
||||
uint32 alignmentM1 = alignment - 1;
|
||||
uint32 bucketIndex = ulog2(size);
|
||||
|
@ -521,7 +526,10 @@ private:
|
|||
{
|
||||
auto it = map_allocatedRange.find(addrOffset);
|
||||
if (it == map_allocatedRange.end())
|
||||
assert_dbg();
|
||||
{
|
||||
cemuLog_log(LogType::Force, "VHeap internal error");
|
||||
cemu_assert(false);
|
||||
}
|
||||
allocRange_t* range = it->second;
|
||||
map_allocatedRange.erase(it);
|
||||
m_statsMemAllocated -= range->size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue