bitable  0.1
Ordered immutable key value storage system.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
memorymappedfile.h File Reference

Read only memory mapped file support. More...

#include "bitablecommon.h"

Go to the source code of this file.

Data Structures

struct  BitableMemoryMappedFile
 

Typedefs

typedef struct
BitableMemoryMappedFileHandle 
BitableMemoryMappedFileHandle
 
typedef struct
BitableMemoryMappedFile 
BitableMemoryMappedFile
 

Functions

BITABLE_API BitableResult bitable_mmf_open (BitableMemoryMappedFile *memoryMappedFile, const char *path, BitableReadOpenFlags openFlags)
 
BITABLE_API BitableResult bitable_mmf_close (BitableMemoryMappedFile *memoryMappedFile)
 

Detailed Description

Read only memory mapped file support.

Typedef Documentation

Memory mapped file Includes the handle, size of the mapping and the address of the mapping. The handle is OS specific, but the size and address are standardstandard.

OS specific handle for a memory mapped file.

Function Documentation

BITABLE_API BitableResult bitable_mmf_close ( BitableMemoryMappedFile memoryMappedFile)

Closes a read-only memory mapped file that has been opened by bitable_mmf_open

Parameters
memoryMappedFileThis will be populated with the memory mapped file details and should be passed to close when done. Does not null check.
Returns
A return code indicating the success of the operation, or a value indicating the kind of error that occured otherwise.
BITABLE_API BitableResult bitable_mmf_open ( BitableMemoryMappedFile memoryMappedFile,
const char *  path,
BitableReadOpenFlags  openFlags 
)

Opens a read-only memory mapped file. Will map the entire file.

Parameters
[out]memoryMappedFileThis will be populated with the memory mapped file details and should be passed to close when done. Does not null check.
pathThis is the path of the file that will be mapped into memory. This is expected to be in a UTF8 encoding. Does not null check.
openFlagsThis is the options for opening the memory mapped file.
Returns
A return code indicating the success of the operation, or a value indicating the kind of error that occured otherwise.