You should change the callback to take a `const std::vector<BLOCKTYPE> &` param instead of the raw pointer, then you won't need the extra reallocations. These come costly when this callback is used more often.