Esempio n. 1
0
int
size_object(Object *o)
{
    int		sz = 0;

    sz += sizeof(o->id.id) + sizeof(o->id.server);
    sz += size_list(o->parents);
    sz += size_symbols(o);
    sz += size_methods(o->methods);
    sz += size_gvars(o->vars);
    sz += size_verbs(o->verbs);
    sz += size_locks(o->locks);
    return sz;
}
Esempio n. 2
0
File: dbpack.c Progetto: braddr/cold
Int size_object(Obj *obj, int memory_size)
{
    Int size = 0;

    size = size_list(obj->parents, memory_size);
    size += size_list(obj->children, memory_size);
    size += size_vars(obj, memory_size);
    size += size_methods(obj, memory_size);

    if (!memory_size)
        size += size_ident(obj->objname, memory_size);

    if (memory_size) {
        size += sizeof(Obj);
    }

    return size;
}