[SPARK-1777 (partial)] bugfix: make size of requested memory correctly