3 ms·
Based on my limited experience with using arenas and preallocated memory I find debugging memory issues significantly harder since it’s super easy to accidental
by the_mitsuhiko 4y ago
Based on my limited experience with using arenas and preallocated memory I find debugging memory issues significantly harder since it’s super easy to accidentally reuse allocations and only notice much later.
- hinkley 4y agoThe first pointer arithmetic bug I fixed, I only narrowed it down once I realized that the function was getting garbage data. Several others since have been the same way. This data structure has a value that can’t possibly be arrived at, therefore this data is fake. When you point to real, dead objects, the bug can be anywhere or everywhere. If you have a pattern of using impure functions everywhere this can be a nightmare to identify and fix at scale.
- avgcorrection 4y agoSounds like there should be some additional metadata memory that is summed in as well (for the total allocation at startup)? To check for such issues.