All Projects → stbrumme → portable-memory-mapping

stbrumme / portable-memory-mapping

Licence: Zlib license
Portable Memory Mapping C++ Class (Windows/Linux)

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to portable-memory-mapping

polardb-race
第一届POLARDB数据库性能大赛-初赛第5名(JAVA)-复赛第7名(CPP)
Stars: ✭ 24 (-29.41%)
Mutual labels:  mmap
bytekit
Java 字节操作的工具库(不是字节码的工具库)
Stars: ✭ 40 (+17.65%)
Mutual labels:  mmap
mmappickle
Python 3 library to store memory mappable objects into pickle-compatible files
Stars: ✭ 34 (+0%)
Mutual labels:  mmap
Flatbuffers
FlatBuffers: Memory Efficient Serialization Library
Stars: ✭ 17,180 (+50429.41%)
Mutual labels:  mmap
s3parcp
Faster than s3cp
Stars: ✭ 31 (-8.82%)
Mutual labels:  mmap
mmap-object
Shared Memory Objects for Node
Stars: ✭ 90 (+164.71%)
Mutual labels:  mmap
box
Box - Open Standard Archive Format, a zip killer.
Stars: ✭ 38 (+11.76%)
Mutual labels:  mmap
radixmmap
Mmap radix sort file by a fixed length prefix of each line
Stars: ✭ 52 (+52.94%)
Mutual labels:  mmap
mmap-io
Clean straight forward mmap-bindings for node.js
Stars: ✭ 62 (+82.35%)
Mutual labels:  mmap
python-sharearray
Share numpy arrays across processes efficiently ideal for large, read-only datasets
Stars: ✭ 32 (-5.88%)
Mutual labels:  mmap
AmeisenNavigation
Navigationmesh Server for my bot based on the TrinityCore MMAP's and Recast & Detour
Stars: ✭ 35 (+2.94%)
Mutual labels:  mmap

This is a mirror of my library hosted at https://create.stephan-brumme.com/portable-memory-mapping/

Portable Memory Mapping C++ Class

Memory mapping is one of the nicest features of modern operating systems: after opening a file in memory-mapped mode you can treat the file as a large chunk of memory and use plain pointers. The operating system takes care of loading the data on demand (!) into memory - utilizing caches, of course.

When using my C++ class MemoryMapped it's really easy:

// open file
MemoryMapped data("myfile.txt");

// read byte at file offset 2345
unsigned char a = data[2345];

// or if you prefer pointers
const short* raw = (const short*) data.getData();
short        b   = raw[300];

Windows is completely different from Linux when it comes to opening a file in memory-mapped mode. The class MemoryMapped hides all the OS specific stuff in only two files: MemoryMapped.h and MemoryMapped.cpp. They compile without any warning with GCC and Visual C++.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].