mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 13:45:57 +00:00
heap_lazy: the docs say 1 MiB chunks, and with the setting off ipc, svc and save writes are as before
Review of #1369: the settings row still said 64 KiB though LAZY_CHUNK is 1 MiB, and two changes ran for every player. ipc.c and svc.c readable() ask the OS again unless TOTK_HEAP_LAZY is on (mem_heap_lazy), and fs_host.c write_file calls mem_heap_commit, which commits the buffer's reserved heap chunks in lazy mode and does nothing otherwise, instead of mem_thaw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54b2975d98
commit
ab356192d7
6 files changed
+19
-6
No files matched your search
@@ -282,6 +282,10 @@ static int heap_fault_raced(uint64_t a) {
|
||||
return plat_mem_state(a & ~(PAGE - 1), (a & ~(PAGE - 1)) + PAGE, &end) == PLAT_PROT_RW;
|
||||
}
|
||||
|
||||
int mem_heap_lazy(void) { return heap_lazy; }
|
||||
|
||||
void mem_heap_commit(uint64_t a, uint64_t n) { heap_commit_range(a, n); }
|
||||
|
||||
uint64_t mem_heap_uncommitted(void) {
|
||||
if (!heap_lazy) return 0;
|
||||
uint64_t size = __atomic_load_n(&heap_size, __ATOMIC_ACQUIRE), done = __atomic_load_n(&heap_committed, __ATOMIC_RELAXED);
|
||||
|
||||
Reference in new issue
Block a user