You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With HUNK_DEBUG enabled size += 0 -> size = 64
Without size=0
It may cause a problem in release, or it may cause a problem in Debug builds which is not clear. Pointers are often tested on truthiness alone, rather than knowing the size of the allocation.
I added a counter to this and found it happens quite a lot, from startup loading ui main menu
p count_zero_sized_allocs
(int) $0 = 558
The text was updated successfully, but these errors were encountered:
Adding a early return null and the menu is still loaded, no issue, but it actually resulted in more memory allocation in most cases. The only values that decreased are "low tempHighwater", "high permanent" and "total hunks in use".
GeneratePermanentShader allocates zero sized chunks via Hunk_Alloc. This may be benign but it probably is not.
First it updates state
Hunk_SwapBanks();
The size of the allocated block will be different depending on HUNK_DEBUG
With HUNK_DEBUG enabled
size += 0
->size = 64
Without
size=0
It may cause a problem in release, or it may cause a problem in Debug builds which is not clear. Pointers are often tested on truthiness alone, rather than knowing the size of the allocation.
I added a counter to this and found it happens quite a lot, from startup loading ui main menu
The text was updated successfully, but these errors were encountered: