added share-memory related code