Fix available memory calculation to consider the current memory used by php