MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / BackupManager

Method BackupManager

src/jrd/nbak.cpp:901–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

899}
900
901BackupManager::BackupManager(thread_db* tdbb, Database* _database, int ini_state) :
902 dbCreating(false), database(_database), diff_file(NULL), alloc_table(NULL),
903 last_allocated_page(0), temp_buffers_space(*database->dbb_permanent),
904 current_scn(0), diff_name(*database->dbb_permanent),
905 explicit_diff_name(false), flushInProgress(false), shutDown(false), allocIsValid(false),
906 master(false), stateBlocking(false),
907 stateLock(FB_NEW_POOL(*database->dbb_permanent) NBackupStateLock(tdbb, *database->dbb_permanent, this)),
908 allocLock(FB_NEW_POOL(*database->dbb_permanent) NBackupAllocLock(tdbb, *database->dbb_permanent, this))
909{
910 // Allocate various database page buffers needed for operation
911 // Align it at sector boundary for faster IO (also guarantees correct alignment for ULONG later)
912 UCHAR* temp_buffers = reinterpret_cast<UCHAR*>
913 (temp_buffers_space.getAlignedBuffer(database->dbb_page_size * 3, database->getIOBlockSize()));
914
915 memset(temp_buffers, 0, database->dbb_page_size * 3);
916
917 backup_state = ini_state;
918
919 empty_buffer = reinterpret_cast<ULONG*>(temp_buffers);
920 spare_buffer = reinterpret_cast<ULONG*>(temp_buffers + database->dbb_page_size);
921 alloc_buffer = reinterpret_cast<ULONG*>(temp_buffers + database->dbb_page_size * 2);
922
923 NBAK_TRACE(("Create BackupManager, database=%s", database->dbb_filename.c_str()));
924}
925
926BackupManager::~BackupManager()
927{

Callers

nothing calls this directly

Calls 5

NBackupStateLockClass · 0.85
NBackupAllocLockClass · 0.85
getAlignedBufferMethod · 0.80
getIOBlockSizeMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected