09 2012 档案
摘要:给C++初学者的50个忠告 1.把C++当成一门新的语言学习(和C没啥关系!真的。); 2.看《Thinking In C++》,不要看《C++变成死相》; 3.看《The C++ Programming Language》和《Inside The C++ Object Model》,不要因为他们很难而我们自己是初学者所以就不看; 4.不要被VC、BCB、BC、MC、TC等词汇所迷惑——他们都是集成开发环境,而我们要学的是一门语言; 5.不要放过任何一个看上去很简单的小编程问题——他们往往并不那么简单,或者可以引伸出很多知识点; 6.会用Visual C++,并不说明你会C++;...
阅读全文
posted @ 2012-09-26 21:00
SolidMango
摘要:General-Purpose RegistersThe 32-bit general-purpose registers EAX, EBX, ECX, EDX, ESI, EDI, EBP, and ESPare provided for holding the following items:• Operands for logical and arithmetic operations• Operands for address calculations• Memory pointersAlthough all of these registers are available for g
阅读全文
摘要:Windows开发的内功和招式 最近一个月笔者休了大约两周的假期,期间没有学习新的开发技术,也没有去游山玩水,而是对自己的知识结构和Windows开发本身进行了一个深入的思考,收获颇多,在这里希望和大家共同分享一下。 如果把Windows开发比作练武,那么就一定有内功和招式,二者相依相存,没有内功的招式只能算是花架子,中看不中用。 那么,什么算是内功呢? 首先,我想说的是系统模型和知识,整天在windows上做开发,对windows的了解够么?可能很多人说,我是做.net开发的,了解那么多没用,.net都做好了。我同意,人各有志嘛,但是我想问个问题,.net写的大型客户端有时候会突然卡...
阅读全文
摘要:上次写了一篇文章,Windows代码heap内存分析实战 由于时间的关系,写的不是很详细,于是有朋友建议写的详细些,于是有了本文。Windows C++代码heap分析详解Windows代码占用的内存主要是堆和栈,其中栈内存又被称为自动内存,一般为系统自动管理,所以常见的问题主要发生在堆内存上。系统中如果分配了堆内存而不释放,或者错误释放,都会产生问题。首先来分析一下堆内存的主要结构:对于普通的堆:1. CreateHeap -> creates a _HEAP2. AllocHeap -> creates a _HEAP_ENTRY对于页堆 (gflags.exe /i +hpa
阅读全文
摘要:知识这东西有时候很奇怪,每次当你重新审视他的时候可能都会有新的收获。最近为了研究一个内存相关的问题,把windows heap相关的内容又复习了一遍,收获不小,记录一下,希望有朋友使用的时候少走些弯路。老话说的好,知己知彼方可百战不殆,没准备就去打仗无异于以卵击石,后果可想而知,那分析heap的问题需要什么基础知识呢:1. Windows 基础知识,内存模型,什么是堆,堆内存是如何管理的,不了解的,建议学习<windows internals>。2. 如何调试相关的问题,如何选择工具,建议学习windbg相关的命令。3. 如何配置系统,如何启动页堆,如何使用gflag。4. 相关的
阅读全文
摘要:C++ Type traitsby John Maddock and Steve ClearyThis is the draft version of an article that appeared in the October 2000 issue ofDr Dobb's JournalGeneric programming (writing code which works with any data type meeting a set of requirements) has become the method of choice for providing reusable
阅读全文
posted @ 2012-09-06 21:31
SolidMango
摘要:Traits: a new and useful template techniqueThis article appeared inC++ Report, June 1995 issue.by Nathan C. MyersInternationalizing the Standard C++ Library requiredinventing some novel techniques, one of which is the unexpectedlyuseful traits -- it radically simplifies the interfaceto class templat
阅读全文
posted @ 2012-09-06 21:29
SolidMango
摘要:What is Predicate?From: http://www.sgi.com/tech/stl/Predicate.htmlA Predicate is a Unary Function whose result represents the truth or falsehood of some condition. A Predicate might, for example, be a function that takes an argument of type int and returns true if the argument is positive.Effective
阅读全文
posted @ 2012-09-02 10:17
SolidMango

浙公网安备 33010602011771号