all skeltol code for malloc/free in place