2013年3月5日

10 Reasons Why You’re Failing to Realize Your Potential as a Developer

摘要: 10 Reasons Why You’re Failing to Realize Your Potential as a DeveloperFebruary 6, 2013 06:10 byAarononthewebinDevelopment Teams,Software Development Practices// Tags:development teams,best practices//Comments (31)Since going full-time on my own startup 6 months ago, I’ve spent a lot of my time recru 阅读全文

posted @ 2013-03-05 15:19 cosmo89929 阅读(337) 评论(0) 推荐(0)

内存分配函数malloc、calloc、realloc的区别(转载)

摘要: 原文地址:http://blog.csdn.net/guoxuequan/article/details/8039401三个函数的声明分别是:void* malloc(unsigned size);void*realloc(void* ptr, unsigned newsize);void* calloc(size_t nelem, size_t elsize);都在stdlib.h函数库内,它们的返回值都是请求系统分配的地址,如果请求失败就返回NULL.malloc用于申请一段新的地址,参数size为需要内存空间的长度,如:char* p;p=(char*)malloc(20);calloc 阅读全文

posted @ 2013-03-05 14:51 cosmo89929 阅读(178) 评论(0) 推荐(0)

new 和 malloc 的区别 (转载)

摘要: 原文地址:http://blog.csdn.net/yanjiaye520/article/details/60483461、new 是c++中的操作符,malloc是c 中的一个函数2、new 不止是分配内存,而且会调用类的构造函数,同理delete会调用类的析构函数,而malloc则只分配内存,不会进行初始化类成员的工作,同样free也不会调用析构函数3、内存泄漏对于malloc或者new都可以检查出来的,区别在于new可以指明是那个文件的那一行,而malloc没有这些信息。4.new可以看成两个动作:1。分配内存(相当于malloc)2。引发构造函数。new 是个操作符,和什么" 阅读全文

posted @ 2013-03-05 14:43 cosmo89929 阅读(156) 评论(0) 推荐(0)

动态内存分配(转载)

摘要: 原文链接:http://blog.csdn.net/yanjiaye520/article/details/60483461. 堆内存分配 :C/C++定义了4个内存区间:代码区,全局变量与静态变量区,局部变量区即栈区,动态存储区,即堆(heap)区或自由存储区(free store)。堆的概念:通常定义变量(或对象),编译器在编译时都可以根据该变量(或对象)的类型知道所需内存空间的大小,从而系统在适当的时候为他们分配确定的存储空间。这种内存分配称为静态存储分配;有些操作对象只在程序运行时才能确定,这样编译时就无法为他们预定存储空间,只能在程序运行时,系统根据运行时的要求进行内存分配,这种方法 阅读全文

posted @ 2013-03-05 14:39 cosmo89929 阅读(201) 评论(0) 推荐(0)

Virtual Memory(转载)

摘要: Virtual MemoryThomas Finley, April 2000Contents and IntroductionContents and IntroductionGeneral DescriptionImpetus for Virtual MemoryWhat Virtual Memory IsThe Virtual AddressPages, and the Virtual Page NumberThe Virtual Page Number through ExamplesThree Main Parts of Virtual MemoryMain Memory (RAM) 阅读全文

posted @ 2013-03-05 12:58 cosmo89929 阅读(435) 评论(0) 推荐(0)

导航