-
Notifications
You must be signed in to change notification settings - Fork 10
Description
newmalloc.c involves a lot of older-looking code that can be very hard to read. One major culprit is the significant use of nested compiler instructions and compiler if statements, which do not have indentation in our coding style. In addition to this overly complex logic, a near total lack of inline code comments makes code slow to skim and often very difficult to decipher without special effort from the reader.
Considering that I occasionally dip into this file to satisfy my own questions about how memory allocation works, cleaner and clearer code would be very beneficial, and I suspect others would also benefit from this change. On top of this, memory allocation is very important, so doing it in a somewhat clear and understandable way is important to avoid issues and confusion for developers.