Return size information for a database, based on the total bytes used and total bytes free
#include <qdb/qdb.h> int qdb_getdbsize_bytes( qdb_hdl_t *db, int scope, uint64_t *bytes_total, uint64_t *bytes_free );
This function provides information about the size of the database associated with the db handle. The information reported includes the total size of the database file (in bytes); this size includes the free pages, which are pages that don't currently store any data. The function also reports the total number of bytes contained in those free pages.
If you vacuum the database, QDB deletes the free pages so the total size of the database file decreases and the number of free bytes goes to 0. For more information, see the VACUUM SQL command, the qdb_vacuum() function, and the Auto-vacuum section of the PRAGMA command.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |