add api for share-memory