OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FileInfo.h File Reference
#include <fcntl.h>
#include <unistd.h>
#include <cstdio>
#include <cstring>
#include <mutex>
#include <set>
#include <vector>
#include "../../Shared/types.h"
#include "Page.h"
#include "Shared/Logger.h"
+ Include dependency graph for FileInfo.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  File_Namespace::FileInfo
 

Namespaces

 File_Namespace
 

Macros

#define DELETE_CONTINGENT   (-1)
 A FileInfo type has a file pointer and metadata about a file. More...
 

Macro Definition Documentation

#define DELETE_CONTINGENT   (-1)

A FileInfo type has a file pointer and metadata about a file.

FileInfo A file info structure wraps around a file pointer in order to contain additional information/metadata about the file that is pertinent to the file manager.

The free pages (freePages) within a file must be tracked, and this is implemented using a basic STL set. The set ensures that no duplicate pages are included, and that the pages are sorted, faciliating the obtaining of consecutive free pages by a constant time pop operation, which may reduce the cost of DBMS disk accesses.

Helper functions are provided: size(), available(), and used().

Definition at line 49 of file FileInfo.h.

Referenced by File_Namespace::FileInfo::freePage(), and File_Namespace::FileInfo::openExistingFile().