Return the size of the meta-dictionary.
void mco_metadict_size( /*IN*/ unsigned short n_entries,
/*OUT*/ unsigned int * size );
n_entries
size
The function returns the size of the meta-dictionary in bytes (including the header).
void
Application snippet:
const char * dbname = "SimpleDb";
int main(int argc, char* argv[])
{
unsigned int size;
mco_metadict_header_t *header;
mco_metadict_size(10, &size); /* figure out the buffer size to
register 10 database dictionaries */
...
header = (mco_metadict_header_t *) malloc(size);
mco_metadict_init(header, size); /* initialize the metadict */
...
}