spark_memory for custom memory management, used for cloud handshake