/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by Nikita Melekhin * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include id alloc_instance(Class cls) { size_t sz = cls->size(); id obj = (id)objc_malloc(sz); obj->set_isa(cls); return obj; }