New answers tagged

1

As has been said in the comments, there are bits missing here for a full answer.... however some general feedback. I'm assuming that the job method will be running on multiple threads. samples How important is it that the number of samples collected is exactly reqsamples? If it's important then you need to protect samples. As it stands, it's possible (...


3

Put const in the right place You write int32_t *const fdMap, which means the pointer fdMap is constant, but it allows writes to the values inside the map. You probably meant that you want the contents of fdMap to be read-only, so you have to write instead: const int32_t *fdMap However, if you want you can make both the pointer and the values pointed to ...


0

Really cool idea for allocator, but style is awful 1) Comments/documentation Memory stuff is perhaps the most complicated part of processes to understand. Please, don't leave your successors just idly looking at this code in terror, not knowing what follows what. While function names are good, reasoning behind execution flow is hard to guess from first ...


Top 50 recent answers are included