| ▲ | CodesInChaos 4 hours ago | |||||||
Your bump allocator suffers from integer overflows turned into buffer overflows when the requested allocation is big enough:
I'd rewrite it like this: | ||||||||
| ▲ | matheusmoreira 2 hours ago | parent | next [-] | |||||||
I used the compiler's __builtin_add_overflow in order to deal with that issue in my memory allocator. At this point I'm probably on track to replace every arithmetic operator in the entire codebase with those things. | ||||||||
| ▲ | dn3500 2 hours ago | parent | prev [-] | |||||||
Your test is backwards. I would write it like this: | ||||||||
| ||||||||