随笔分类 -  内存管理

摘要:http://oldblog.antirez.com/post/redis-manifesto.htmlRedis ManifestoRedis宣言Many times I don't know what to exactly reply to feature requests, or questions about why things in Redis are done in a specific way. Most of the time the questions make a lot of sense, there is not just a way to make thin 阅读全文
posted @ 2014-01-06 13:21 blockcipher 阅读(247) 评论(0) 推荐(0)
摘要:http://www.enjoythearchitecture.com/redis-architectureThe architecture ofREDISREDISis an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. Redis works with an in-memory dataset. Depending on 阅读全文
posted @ 2013-12-19 22:22 blockcipher 阅读(949) 评论(0) 推荐(0)
摘要:本文写的非常好,但是翻译的质量不是很好,因此本文基于翻译做了修改。转自http://www.oschina.net/translate/what-every-programmer-should-know-about-memory-part1[Editor's introduction: Ulrich Drepper recently approached us asking if we would be interested in publishing a lengthy document he had written on how memory and software intera 阅读全文
posted @ 2013-08-11 11:16 blockcipher 阅读(6084) 评论(0) 推荐(0)
摘要:/proc/meminfo ExplainedMarch 2003"Free," "buffer," "swap," "dirty." What does it all mean? If you said, "something to do with the Summer of '68", you may need a primer on 'meminfo'.The entries in the /proc/meminfo can help explain what 阅读全文
posted @ 2013-06-29 18:57 blockcipher 阅读(986) 评论(0) 推荐(0)
摘要:转自http://ifeve.com/cpu-cache-flushing-fallacy-cn/即使是资深的技术人员,我经常听到他们谈论某些操作是如何导致一个CPU缓存的刷新。看来这是关于CPU缓存如何工作和缓存子系统如何与执行核心交互的一个常见误区。本文将致力于解释CPU缓存的功能以及执行程序指令的CPU核心如何与缓存交互。我将以最新的Intel x86 CPU为例进行说明,其他CPU也使用相似技术以达到相同目的。绝大部分常见的现代系统都被设计成在多处理器上共享内存。共享内存的系统都有一个单独的内存资源,它会被两个或者更多的独立CPU核心同时访问。核心到主存的延迟变化范围很大,大约在10- 阅读全文
posted @ 2013-03-27 18:06 blockcipher 阅读(281) 评论(0) 推荐(0)
摘要:Getting started with HeapyUsage exampleThe following example showsHow to create the session context: hp=hpy()How to use the interactive help: hp.doc, hp.doc.docHow to show the reachable objects in the heap: hp.heap()How to create and show a set of objects: hp.iso(1,[],{})How to show the shortest pat 阅读全文
posted @ 2013-02-25 11:21 blockcipher 阅读(794) 评论(0) 推荐(0)
摘要:本文引自http://blog.csdn.net/zhanghefu/article/details/5003407#做几点补充说明:1. 堆和栈存在的问题:前者存在内存泄漏内田,后者存在栈溢出问题。2.C语言是默认是采用传值调用的。所以当指针做参数时,修改指针的值只是局部的,修改指针指向的值是有副作用的。3.内存耗尽问题在所有系统都是存在的,在linux中,由于内存分配lazy机制,会导致程序异常退出。[导语]内存管理是C++最令人切齿痛恨的问题,也是C++最有争议的问题,C++高手从中获得了更好的性能,更大的自由,C++菜鸟的收获则是一遍一遍的检查代码和对C++的痛恨,但内存管理在C++中 阅读全文
posted @ 2013-01-16 13:18 blockcipher 阅读(189) 评论(0) 推荐(0)
摘要:内存池(MemPool)技术详解收藏本文已经迁移到:http://cpp.winxgui.com/cn:dive-into-memory-pool概述内存池(MemPool)技术备受推崇。我用google搜索了下,没有找到比较详细的原理性的文章,故此补充一个。另外,补充了boost::pool组件与经典MemPool的差异。同时也描述了MemPool在sgi-stl/stlport中的运用。经典的内存池技术经典的内存池(MemPool)技术,是一种用于分配大量大小相同的小对象的技术。通过该技术可以极大加快内存分配/释放过程。下面我们详细解释其中的奥妙。经典的内存池只涉及两个常量:MemBloc 阅读全文
posted @ 2010-09-04 10:54 blockcipher 阅读(779) 评论(0) 推荐(0)
摘要:C++内存管理变革收藏本文已经迁移到:http://cpp.winxgui.com/cn:story-of-c-memory-management-innovationC++内存管理变革许式伟2005-7-16关键字: 内存管理 垃圾回收器 内存配置器 引用计数keyword: memory manage, memory recycler, allocator, reference count引言C/C++语言的内存管理经历了几次变革,但至今仍未能趋于成熟。这几次变革主要包括:1.从malloc/free到new/delete。这场变革是OOP技术兴起的产物。C++是强类型语言,new/del 阅读全文
posted @ 2010-09-04 10:19 blockcipher 阅读(256) 评论(0) 推荐(0)