An API to use local memory