fixed memory computations on openbsd 5.3