Corrected length argument for memsets in calc_PVT (wouldn't build on clang)