open-ead / sead

Decompilation of sead: the standard C++ library for first-party Nintendo games
190 stars 26 forks source link

heap: Implement seadHeapMgr and seadArena #105

Closed MonsterDruide1 closed 2 years ago

MonsterDruide1 commented 2 years ago

Two NON_MATCHINGs on this one:

  1. HeapMgr::destroy cleans up two static variables and destroys all heaps from the lists. However, I can't find the right iterator for this one, so I just listed all three versions I tried there. (https://decomp.me/scratch/saxAV)
  2. HeapMgr::findContainHeap looks a bit too lengthy overall - especially looking at the CriticalSection-mutex. (https://decomp.me/scratch/QPDI8)

Apart from that, I added a few functions to FindContainHeapCache, which partly seem useless to me - but I can't keep up the match level with fewer functions, as I don't know enough about how Atomics are used here.


This change is Reviewable