def METHOD_NAME(self, fd, args):
    memfd_offset = args.offset
    if args.flags & ASAHI_BO_PIPELINE:
        alloc = self.renderer.ctx.pobj
    else:
        alloc = self.renderer.ctx.gobj
    obj = alloc.new(args.size, name=f"GBM offset {memfd_offset:#x}", track=False)
    obj._memfd_offset = memfd_offset
    obj._pushed = False
    obj.val = obj._map = mmap.mmap(self.memfd, args.size, offset=memfd_offset)
    self.bos[memfd_offset] = obj
    args.offset = obj._addr
    if args.flags & ASAHI_BO_PIPELINE:
        args.offset -= self.renderer.ctx.pipeline_base
    self.log(f"Create BO @ {memfd_offset:#x}")
    return 0