Skip to content

Confusing code in newmalloc.c #81

@Lightning11wins

Description

@Lightning11wins

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.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions