dbh_set_size(3)
π dbh_set_size(3) β DBHashTables Programmers' Manual π
okay bestie, we're in the DBHashTables programmer's manual, section 3, and today's main character is dbh_set_size π
β¨ NAME β¨
dbh_set_size, dbh_set_recordsize β set maximum or current record size π
π¦ SYNOPSIS π¦
#include <dbh.h>
int dbh_set_size (DBHashTable *dbh, FILE_POINTERsize);
void dbh_set_recordsize (DBHashTable *dbh, int record_size );
πΈ DESCRIPTION πΈ
so there's two functions here and they're lowkey cousins, but they do different things, ok? let's go π
dbh_set_size defines the maximum amount of memory that's gonna be allocated to the DBHashTable records. and listen β this is nonvolatile information, meaning you literally only need to set it once and it sticks. the default is 1024 bytes. no cap. β
dbh_set_recordsize sets the recordsize of the data in the current DBHashTable, and it gets called implicitly by calling dbh_set_data. so if you're using dbh_set_data you're already covered, bestie π«Ά
but fr fr: it is very important to call this function ifdbh_set_datais not used. Unpredictable results will follow ifrecord_sizeis not set. like, chaos. we don't want chaos. π
DBHashTable records are variable in length, so use this function at least once if you're planning to use fixed length records. the parameter record_size is the amount of bytes to be reserved for the current DBHashTable record data. that's the whole vibe. β¨
π RETURN VALUE π
dbh_set_sizereturns0on error,1otherwise. (yes,0means error here, it's giving chaotic but that's just how it is π)dbh_set_recordsizereturns the amount of bytes in the currentDBHashTablerecord.
π SEE ALSO π
dbh(0)dbh_update(3)dbh_writeheader(3)dbh_set_data(3)dbh_set_key(3)
π Author π
Edscott Wilson Garcia <edscott@xfce.org> β iconic, we stan π
and that's the tea, bestie π this page came to you from DBHashTables, version DBH, as dbh_set_size(3) β go forth and set your sizes correctly, mwah π
β¨π§
π¦ where this page comes from
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- Copyright (c) 2010 Edscott Wilson Garcia (edscott@xfce.org)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms