fixed memory calculation...