Use get_associated_executor and get_associated_allocator.