eo: add a EO_DEBUG environment variable to get some useful statistic.

This commit is contained in:
Cedric BAIL 2013-03-12 19:16:43 +09:00
parent 4d316f3bec
commit b309d26e3f
1 changed files with 7 additions and 0 deletions

View File

@ -1062,6 +1062,13 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent, ...)
_eo_class_constructor(klass);
if (getenv("EO_DEBUG"))
{
fprintf(stderr, "Eo class '%s' will take %i octets per object.\n",
desc->name,
klass->data_offset + EO_ALIGN_SIZE(klass->desc->data_size) + klass->extn_data_size);
}
va_end(p_list);
return klass;