1/*
2 * Copyright (C) 2020-2022 The opuntiaOS Project Authors.
3 * + Contributed by Nikita Melekhin <nimelehin@gmail.com>
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9#include <libobjc/memory.h>
10
11id alloc_instance(Class cls)
12{
13 size_t sz = cls->size();
14 id obj = (id)objc_malloc(sz);
15 obj->set_isa(cls);
16 return obj;
17}