<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[livedrm的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/livedrm</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; livedrm]]></copyright><item><title><![CDATA[AVL树插入的简单实现]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/7530167</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/7530167</guid><author>livedrm</author><pubDate>Thu, 03 May 2012 09:08:15 +0800</pubDate><description><![CDATA[avl.h
#ifndef _AVL_TREE_H
#define _AVL_TREE_H

struct avl_node
{
        avl_node(int k);
        int key;
        char bf;//Hight(left) - Hight(right), balance factor[-1, 0, 1].
        avl_]]></description><category></category></item><item><title><![CDATA[AVL树基本原理]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/7476292</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/7476292</guid><author>livedrm</author><pubDate>Thu, 19 Apr 2012 10:22:33 +0800</pubDate><description><![CDATA[在算法与数据结构中对平衡二叉搜索树的AVL树的定义是如下，
a tree is balanced if and only if for every node the heights of its two subtrees differ by at most 1.
Trees satisfying this condition are often called AVL-trees( After]]></description><category></category></item><item><title><![CDATA[静态库动态库的配置使用]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/6796747</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/6796747</guid><author>livedrm</author><pubDate>Wed, 21 Sep 2011 12:09:12 +0800</pubDate><description><![CDATA[writing and using libraries
几乎所有的程序都链接一个或多个库。当你运行gcc的时候，系统会默认添加libc库，运行g++的时候会加入stdc++库。库的出现大大增强了程序的可复用性，便于管理。库分为静态库和动态库。使用静态库，程序会变大（加入整个静态]]></description><category></category></item><item><title><![CDATA[守护进程，xinetd使用]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/6573201</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/6573201</guid><author>livedrm</author><pubDate>Tue, 06 Sep 2011 15:18:39 +0800</pubDate><description><![CDATA[Definition: In Unix and other computer multitasking operating systems, a daemon is a computer program that runs in the background, rather than under the direct control of a user; they are usually ]]></description><category></category></item><item><title><![CDATA[Linux下malloc/free内存碎片问题]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/6735876</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/6735876</guid><author>livedrm</author><pubDate>Wed, 31 Aug 2011 18:13:04 +0800</pubDate><description><![CDATA[通过对malloc，free源码的分析，发现在堆上分配内存，很容易造成内存碎片。内存碎片在这里可以从两个方面进行分析，物理地址的内存碎片和线性地址（虚拟地址）的内存碎片。
首先是物理地址的内存碎片，malloc_free_list大小依次为8，16，32....。那么我们请求的]]></description><category></category></item><item><title><![CDATA[Linux下malloc/free详解]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/6733224</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/6733224</guid><author>livedrm</author><pubDate>Tue, 30 Aug 2011 18:38:31 +0800</pubDate><description><![CDATA[在程序开发中，堆和栈是最常使用的两个内存区，在Linux下栈分为用户栈和内核栈，内核栈具有固定大小，而用户栈可以通过ulimit来设定，最大8M。
堆具有很大的灵活性，程序员可以根据需要获取任意大小的内存（只只是相对于栈来说，对于32位机，它最大能分配2G多的虚拟地址空间）。m]]></description><category></category></item><item><title><![CDATA[little endian & big endian (record)]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/6120011</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/6120011</guid><author>livedrm</author><pubDate>Thu, 06 Jan 2011 12:52:00 +0800</pubDate><description><![CDATA[Programmers should strive to make their programs portable across different machines and compilers.For program objects that span multiple bytes, we must establish two conventions: what will be the address of the object, and how will we order the bytes in me]]></description><category></category></item><item><title><![CDATA[内联函数并不总是内联]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/6118641</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/6118641</guid><author>livedrm</author><pubDate>Wed, 05 Jan 2011 18:55:00 +0800</pubDate><description><![CDATA[Inline function是在C++中引入的一种机制，它可以拓展函数代码，避免调用函数的额外开销。在Linux环境下，gcc编译选项必须加上优化选项才能使inline有效。如inline int fun(int i, int j){        printf("%d/n", i+j);        return i+j;}void main(){fun(3,4);}不带优化编译选项：g++ -S inline.cc产生的汇编代码片断如下：andl    $-16, %esp    ；栈指针对齐sub]]></description><category></category></item><item><title><![CDATA[ELF format -- How programs look from the inside]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/6090151</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/6090151</guid><author>livedrm</author><pubDate>Tue, 21 Dec 2010 18:02:00 +0800</pubDate><description><![CDATA[ELF format -- How programs look from the inside
ELF 是用于Linux系统下一种文件格式,包括目标文件,二进制文件,共享库和core dump。
它非常简单,而且具有好的输出格式。
ELF针对不同的架构具有相同的布局,但是排列次序(endianness)和字长可能不同；重定位类型,符号类型和可能具有平台相关的值,当然也包括平台相关的代码。]]></description><category></category></item><item><title><![CDATA[Regular Expression]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5890543</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5890543</guid><author>livedrm</author><pubDate>Fri, 17 Sep 2010 12:43:00 +0800</pubDate><description><![CDATA[<br />Regular expressions(RegEx) are an extremely
powerful tool for manipulating text and data. They are now standard features in
a wide range of languages and popular tools, including perl, python, ruby,
grep, awk and so on.<br />Every languages or too]]></description><category></category></item><item><title><![CDATA[Linux下C/C++程序内存布局 各种类型数据存储区域及生长方向]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5694077</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5694077</guid><author>livedrm</author><pubDate>Fri, 25 Jun 2010 15:08:00 +0800</pubDate><description><![CDATA[<br /><br />在32位系统下，对于一个进程来说，理论上它具有4G的内存空间,那么写一小段代码来看看各个部分在逻辑上是如何分布的。<br />#include <stdio.h><br />#include <stdlib.h><br />int g_i = 3;<br />static int s_i = 4;<br />const int c_i = 5;<br />char* g_p = "abc";<br />void fun()<br />{}<br />static void s_fun]]></description><category></category></item><item><title><![CDATA[程序员的十层楼 11层(上帝)]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5669000</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5669000</guid><author>livedrm</author><pubDate>Sun, 13 Jun 2010 13:46:00 +0800</pubDate><description><![CDATA[第10层 上帝看了上面的小标题，你可能会觉得奇怪，这篇文章不是讲"程序员的十层楼"吗？怎么冒出了第11层来了？其实这并不矛盾，程序员确实只有十层楼，因为爬到第11层时，已经变成上帝，不再是程序员了；所以超出10层楼本身并不重要，关键的问题是看你有没有能力变成上帝。1、谁是上帝？菜鸟们认为Linus Torvalds是程序员中的上帝，看完了前面各层楼的介绍，此时再看到这句话，相信你要忍不住在心里笑起来。当然，你会不会笑起来是事先注定的。Don Knuth也不是上帝，他离上帝还有三层楼的距离。即使是大哲们，他们]]></description><category></category></item><item><title><![CDATA[程序员的十层楼(8~9层）]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5668974</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5668974</guid><author>livedrm</author><pubDate>Sun, 13 Jun 2010 13:37:00 +0800</pubDate><description><![CDATA[<br />第8层 科学家<br /> <br />科学家向来都是一个神圣的称号，因此我把他放在了"大师"之上。要成为科学家，你的贡献必须超越大师，不妨随便举一些例子。<br />如果你象Dijkstra一样设计了ALGOL语言，提出了程序设计的三种基本结构：顺序、选择、循环，那么你可以爬到第8层楼来。顺便说一下，即使抛开这个成果，Dijkstra凭他的PV操作和信号量概念的提出，同样可以进到这层楼。<br />如果你象Don Knuth一样，是数据结构与算法这门学科的重要奠基者，你也可以进到这层楼来。当然]]></description><category></category></item><item><title><![CDATA[程序员的十层楼（6～7层）]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5668960</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5668960</guid><author>livedrm</author><pubDate>Sun, 13 Jun 2010 13:31:00 +0800</pubDate><description><![CDATA[<br />第6层 学者<br /> <br />当"专家"们想继续往上一层楼爬时，他们几乎一眼就可以看到楼梯的入口，不过令他们吃惊的是，楼梯入口处竖了一道高高的门槛，上面写着"创新"二字。不幸的是，大多数人在爬到第5层楼时已经体能消耗过度，无力翻过这道门槛。<br />有少数体能充足者，可以轻易翻越这道门槛，但是并不意味着体力消耗过度者就无法翻越，因为你只是暂时还没有掌握恢复体能的方法而已，当掌握了恢复体能的方法，将体能恢复后，你就可以轻易地翻越这道门槛了。<br />怎么才能将体能恢复呢？我们的老祖宗"]]></description><category></category></item><item><title><![CDATA[程序员的十层楼（4~5层）]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5668947</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5668947</guid><author>livedrm</author><pubDate>Sun, 13 Jun 2010 13:24:00 +0800</pubDate><description><![CDATA[<br />第4层 大牛<br /> <br />从第3层爬到第4层可不像上面说过的那几层一样容易，要成为大牛的话，你必须要能做牛人们做不了的事情，解决牛人们解决不了问题。比如牛人们通常都不懂写操作系统，不会写编译器，不懂得TCP/IP协议的底层实现，如果你有能力将其中的任何一个实现得象模象样的话，那么你就从牛人升级为"大牛"了。<br />当然，由于各个专业领域的差别，这里举操作系统、编译器、TCP/IP协议只是作为例子，并不代表成为"大牛"一定需要掌握这些知识，以时下热门的多核编程来说，如果你能比牛人们]]></description><category></category></item><item><title><![CDATA[程序员的十层楼(1~3层)]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5668941</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5668941</guid><author>livedrm</author><pubDate>Sun, 13 Jun 2010 13:20:00 +0800</pubDate><description><![CDATA[<br />自西方文艺复兴以来，中国在自然科学方面落后西方很多，软件领域也不例外。当然现在中国的许多程序员们对此可能有许多不同的意见，有些人认为中国的程序员水平远落后于西方，有些则认为中国的程序员个人能力并不比西方的程序员差，只是整个软件产业落后而已。<br />那么，到底中国的程序员水平比西方程序员水平差，还是中国有许多优秀的程序员达到或超过了西方程序员同等水平呢？要解决这个问题，必须先知道程序员有多少种技术层级，每个层级需要什么样的技术水平，然后再比较中国和西方在各个技术层级的人数，就可以知道到底有没有]]></description><category></category></item><item><title><![CDATA[指针，引用区别]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5664873</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5664873</guid><author>livedrm</author><pubDate>Fri, 11 Jun 2010 18:06:00 +0800</pubDate><description><![CDATA[指针和引用看上去完全不同，但它们似乎具有相同的功能。先看一个小例子，了解下究竟编译器对他们做了什么处理。int main(){	int i = 3;	int *p = &i;	return 0;}我们生成它的汇编代码，主要部分为：main:.LFB2:        pushl   %ebp.LCFI0:        movl    %esp, %ebp.LCFI1:        subl    $8, %esp.LCFI2:        andl    $-16, %esp        movl ]]></description><category></category></item><item><title><![CDATA[const 小结]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5659120</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5659120</guid><author>livedrm</author><pubDate>Wed, 09 Jun 2010 17:38:00 +0800</pubDate><description><![CDATA[<br /><br />通用定义:In computer programming, a constant is a special kind of variable whose value cannot typically be altered by the program during its execution.<br /> <br />const主要用于限制程序员的写行为，限制不是禁止，仍然可以通过各种方式突破这种限制。<br /> <br />1.修饰普通变量<br />const int i; /]]></description><category></category></item><item><title><![CDATA[异或]]></title><link>https://blog.youkuaiyun.com/livedrm/article/details/5656231</link><guid>https://blog.youkuaiyun.com/livedrm/article/details/5656231</guid><author>livedrm</author><pubDate>Tue, 08 Jun 2010 17:19:00 +0800</pubDate><description><![CDATA[1.异或运算具有交换律、结合律。2.一个数和自己做异或的结果是0。xorl %eax, %eax比movl $0, %eax快3.与0做异或，保持原值不变。运用特性1，2，3，常在面试中遇到不用中间变量交换两个变量值。int A=5, B=3;A         B5         3A=A^B   5^3       3B=A^B   5^3  5^(3^3)=5^0=5A=A^B  5^3^5=3 5（这样运算只能帮助更好的理解异或的特性，但是针对效率而言，它不及采用中间变量的办法）。还有一个应用如：]]></description><category></category></item></channel></rss>