Merge branch 'master' into runtime

* master: (17 commits)
  Slightly change the memory management API.
  ...