Fix #1340 (cherry picked from commit 2c7c1f8b9bbb903ae5a33eeb02b70cd8f8e8ce8b)
Fix #1340
(cherry picked from commit 2c7c1f8b9bbb903ae5a33eeb02b70cd8f8e8ce8b)

Conflicts:
	ext/kernel/memory.h

unisys12/phalcon-hhvm,unisys12/phalcon-hhvm,unisys12/phalcon-hhvm,Zaszczyk/cphalcon,Zaszczyk/cphalcon,unisys12/phalcon-hhvm,unisys12/phalcon-hhvm,Zaszczyk/cphalcon,Zaszczyk/cphalcon,unisys12/phalcon-hhvm