Fix heap overrun problem in x86_64 environment.
Merge remote-tracking branch 'origin/mark_and_sweep-improve_memusage' into develop