[libc,cmds] Add arena numbers to meminfo -m, prohibit fprintf to fputs conversions #2109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While cleaning up
meminfo -m
blank lines and adding arena numbers instead (see screenshot) it was noticed thatmeminfo
was ~30 bytes over 4K. Trying to save those bytes involved another couple of changes; sharing some strings, and usingfd
as a global, rather than being passed around to most all the internal functions. Discussed with @Mellvik in Mellvik/TLVC#105 (comment). Sorry about all the new changes to reduce size, just after you ported the previous version, with all its changes!!It was also noticed that while the
-fno-builtin-printf
option had already been added, prohibiting GCC compilation conversion of printf to fputs, this did not apply to fprintf being converted to fputs! After reading everywhere for a solution to no avail, I guessed at-fno-builtin-fprintf
which was accepted. Recompiling all applications resulted in saving 4K floppy space, apparently from not dragging in the extra fputs code into a number of applications.Here's
meminfo -m
without blank lines: