[lib][heap] make the heap 64bit safe, only put magic value if needed
[arm64] more tweaks