add h_alloc() which calls errx() on failure and use it for all basic allocation
Rationale: "Basic allocation" refers to things outside of parsing proper, mostly initialization. If such allocations fail, the system is globally emory-starved from which it will likely not recover by returning failure. In this case, terminating the process is in fact the most robust strategy as it may mean the difference between a permanent hang and a temporary crash.
Showing
- src/allocator.c 10 additions, 5 deletionssrc/allocator.c
- src/allocator.h 13 additions, 11 deletionssrc/allocator.h
- src/bitwriter.c 2 additions, 4 deletionssrc/bitwriter.c
- src/internal.h 1 addition, 1 deletionsrc/internal.h
- src/pprint.c 2 additions, 4 deletionssrc/pprint.c
- src/registry.c 2 additions, 4 deletionssrc/registry.c
Loading
Please register or sign in to comment