Return the size of a database
#include <qdb/qdb.h>
int qdb_getdbsize( qdb_hdt_t *db,
int scope,
uint32_t *page_size,
uint32_t *total_pages,
uint32_t *free_pages );
qdb
This function provides information about the size of the database file associated with the database handle db. The database's size on the filesystem is page_size × total_pages.
If you vacuum the database, QDB deletes the free pages so the total pages goes down, free pages goes to 0, and the database file becomes smaller. For more information, see the VACUUM SQL command, qdb_vacuum() function, and the Auto-vacuum section of the PRAGMA command.
QNX Neutrino
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |