Hacker News new | ask | show | jobs
by jeffreyrogers 3947 days ago
The whole point of using regions is not to be worrying about pointer lifetimes. And you don't need Valgrind when you have regions since you aren't going to leak memory by forgetting to free something. Valgrind solves a problem that doesn't exist when you use regions.

If you're really worried that you'll leak an entire region worth of data just allocate the region with malloc instead of mmap and then use Valgrind to tell you what regions you aren't destroying.

1 comments

Valgrind isn't for memory leaks, its main purpose is for catching out-of-bounds and uninitialized accesses.