简体   繁体   中英

c++ FIFO implementation for VERY LARGE 10G buffer

I have a need to implement a 10G ring buffer (FIFO). I need to write this program in C++ for integration (have to integrate with C++ API) reasons even though I think it will be easier in Java with it's FileChannel class. I know I'll need to use a memory-mapped file, just not sure how to do it in C++. I figure I'll have to use a buffer and re-map it for different parts of the underlying file? Something like that. Anyway, if anyone has some example code (non MFC), that would be great.

I'll be implementing this on 32 bit hardware running Windows 7 32 bit.

Thanks.

One way to create a memory mapped file, that works both on Windows and UNIX, is to use the Boost C++ libraries, see here . This code handles large files (> 4 GB) on most 32-bit platforms; see here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM