Closed HookedBehemoth closed 2 years ago
Hey I was worried about memory usage which is why I never did this. Have you checked how much extra memory is being used with this?
Pondering over how to actually meassure this. Found this file in dkA64 newlib: https://github.com/devkitPro/newlib/blob/devkitA64/libgloss/libsysbase/sbrk.c Suggests to me that this should work:
u64 ram_total = (u64)fake_heap_end - (u64)fake_heap_start;
void *tmp = malloc(1);
u64 ram_usage = (u64)tmp - (u64)fake_heap_start;
free(tmp);
The results are irritating though. available: 5869568 pre patch: 96464 post patch: it jumps between 109488 and 1755648.
Render time in Tesla-Menu goes down from ~9ms to ~5ms
god fuck newlib
Oh well I resorted back to just meassure the allocation size of stbtt_GetCodepointBitmap which is 16355 bytes. Missing is the bucket size and the additional code size of the container.
Thank you! Yeah I think that should be alright. The rendering time decrease really does sound great
Don't know how long that first commit was pending. I just rebased and only saw it here now.
Edit: Just noticed an issue with that commit and I don't feel like debugging something I wrote a year ago. Gonna remove that commit.