Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/cap/cap.c

    raafed15 re394c196  
    9393
    9494static slab_cache_t *cap_cache;
     95static slab_cache_t *kobject_cache;
    9596
    9697static size_t caps_hash(const ht_link_t *item)
     
    123124        cap_cache = slab_cache_create("cap_t", sizeof(cap_t), 0, NULL,
    124125            NULL, 0);
     126        kobject_cache = slab_cache_create("kobject_t", sizeof(kobject_t), 0,
     127            NULL, NULL, 0);
    125128}
    126129
     
    394397}
    395398
     399kobject_t *kobject_alloc(unsigned int flags)
     400{
     401        return slab_alloc(kobject_cache, flags);
     402}
     403
     404void kobject_free(kobject_t *kobj)
     405{
     406        slab_free(kobject_cache, kobj);
     407}
     408
    396409/** Initialize kernel object
    397410 *
     
    462475        if (atomic_postdec(&kobj->refcnt) == 1) {
    463476                kobj->ops->destroy(kobj->raw);
    464                 free(kobj);
     477                kobject_free(kobj);
    465478        }
    466479}
Note: See TracChangeset for help on using the changeset viewer.