mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 13:45:57 +00:00
heap_lazy adds the committed heap and the first-use faults with their total time to the commit census lines, so a log shows what the setting saved and cost
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a0587b59e7
commit
de0b1f899f
3 files changed
+17
No files matched your search
@@ -286,6 +286,13 @@ int mem_heap_lazy(void) { return heap_lazy; }
|
||||
|
||||
void mem_heap_commit(uint64_t a, uint64_t n) { heap_commit_range(a, n); }
|
||||
|
||||
void mem_heap_lazy_stats(uint64_t *faults, uint64_t *ns, uint64_t *committed, uint64_t *size) {
|
||||
*faults = (uint64_t)__atomic_load_n(&lazy_faults, __ATOMIC_RELAXED);
|
||||
*ns = (uint64_t)__atomic_load_n(&lazy_ns, __ATOMIC_RELAXED);
|
||||
*committed = __atomic_load_n(&heap_committed, __ATOMIC_RELAXED);
|
||||
*size = __atomic_load_n(&heap_size, __ATOMIC_ACQUIRE);
|
||||
}
|
||||
|
||||
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