tuning for zhengtao's require
memtest should use mem_segments[0].end instead of ram_end/start