GithubHelp home page GithubHelp logo

zht515 / concurrentmemory Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 39 KB

用于替代系统的内存分配相关的函数。实现在多核多线程的环境下,效率较高的处理高并发的内存池。相较于系统的内存分配相关的函数(malloc、free等)减少内存碎片,提高效率,使得平均运行效率该高于malloc,解决多线程场景下在内存申请过程中的锁竞争问题。

C++ 100.00%

concurrentmemory's Introduction

ConcurrentMemory

用于替代系统的内存分配相关的函数。实现在多核多线程的环境下,效率较高的处理高并发的内存池。相较于系统的内存分配相关的函数(malloc、free等)减少内存碎片,提高效率,使得平均运行效率该高于malloc,解决多线程场景下在内存申请过程中的锁竞争问题。 . 项目内容: 以定长哈希映射的空闲内存池为基础,使用三层缓存分配结构:

  1. 线程缓存:解决多线程下高并发运行场景线程之间的锁竞争问题;
  2. 中心控制缓存:负责大块内存切割分配给线程缓存以及回收线程缓存中多余的内存进行合并归还给页缓存;
  3. 页缓存:以页为单位申请内存,为中心控制缓存提供大块内存。

. 开发环境:Windows10、C++、VS2019

concurrentmemory's People

Contributors

zht515 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.