Giter Site home page Giter Site logo

unifiedmemorymanager's Introduction

UnifiedMemoryManager

统一内存管理

###功能说明: 1:分配/释放内存时使用类型萃取技术,检查是否需要调用构造函数和析构函数,提高分配效率。 2:内部使用内存池管理内存分配和释放,提高效率,减少内存碎片。 3:实现定置的统一内存管理接口,支持剖析内存泄露、内存热点、内存块分配情况。 4:为了保证性能,默认不开启剖析功能,可通过调宏接口设置、配置文件、在线控制等方式开启/关闭控制功能。 5:提供NEW/DELETE/NEW_ARRAY/DELETE_ARRAY四个定置宏接口,提供SET_CONFIG_OPTIONS接口设置剖析选项。 6:后台默认启动一个管道监听服务线程,监听客户端工具的消息,支持在线开启/关闭剖析选项,生成剖析报告。

详细的使用方式可参考UMM/Test.cpp下的测试用例。

框架设计说明: ###设计如下几个单例类 内存管理类(负责分配内存/释放内存) 内存剖析类(剖析内存泄露、内存热点、内存分配情况) 配置管理类(管理剖析选项) IPC监听服务(使用观察者模式实现,监听客户端工具发送的消息,根据不同的命令消息做相应的处理。) 代码UML类图 image

###代码结构: UMM/IPC目录下为命名管道的实现代码。 UMM/UMM目录下为统一内存管理的实现代码。 UMM/UMMTest目录下为统一内存管理定制相关接口测试的实现代码。 UMM/MemoryAnalyseTool目录下为IPC在线控制剖析功能的工具的实现代码。 UMM/UML框架类图目录下为项目的框架类图文件,使用StartUML可以打开编辑。

ps:项目中使用了C++11部分库,当前在Windows环境下是使用vs2013开发,Linux环境还未测试,待后续完善。

unifiedmemorymanager's People

Contributors

changfeng777 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.