Implementation of simplified talloc api.