1 Star 0 Fork 1

搬砖现场 / shm_container

forked from sylar / shm_container 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

SHM-Container Documentation

Introduction

Shared-memory is best known as an effective IPC method, moreover, it is a powerful design pattern in server architecture with some notable features:

  • process restart without memory data lost
  • achieve modularity with decoupled processes
  • keep service HA even with failure in one process
  • almost no performance cost for inter process communication

Many popular high-volume internet services (such as QQ server) have benefit from usage of shared-memory techniques. However it is not as easy as using in-process libraries (such as STL) when working with OS shm interface, because you have to manage memory pages directly. So what this project is valuable is that it offers a collection of shared-memory containers with familiar interface for you, and also with the following features:

  • provide a unified interface for different underlying shm mechanism (SYSV, SYSV_HugeTLB, POSIX, ANON, HEAP)
  • provide useful container such as hash-map, fifo-queue, broadcast-queue(sync-buf), etc
  • efficient C++11 lock-free implemenation aimed to offer extreme high performance
  • designed for robust and fast, sufficient unit-tests, production ready and verified
  • compact and clean code, only consist of C++ headers with no external dependency

See document of classes in namespace shmc for detail.

Limitation

Currently only Linux/x86 platform is supported. Moreover, its design goal is all for server side application.

HowToUse

The library consists only C++ headers, so importing it in your project is very easy (just add -I dir). It also provides a bazel BUILD file so just set deps on it if you are using bazel.

If you want to build unit-tests, install bazel and gtestx first.

Document

You can find document online here: SHM-Container Documentation

Also you can generate doc from source: 1) install cldoc 2) cd doc; make

空文件

简介

A collection of shared memory containers for high performance server 展开 收起
C++
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/zhaowx_admin/shm_container.git
git@gitee.com:zhaowx_admin/shm_container.git
zhaowx_admin
shm_container
shm_container
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891