02 2013 档案

C++ 与 C 的预处理能力
摘要:#include <stdio.h> int main(void){ const int first = 5; int second = 8; int *p = (int *) &first; *p = 6; second = first; printf("second %d first %d\n", second, first); printf("con... 阅读全文

posted @ 2013-02-27 12:53 阿加 阅读(157) 评论(0) 推荐(0)

python
摘要:python学习 http://www.pythoner.cn/关于feed:http://buxulianwang.lofter.com/post/12a32e_af2368 不许联网Google group 订阅方法组页: https://groups.google.com/forum/#!forum/python-cn对应的 feed.新主题.top50: https://groups.google.com/forum/feed/python-cn/topics/atom.xml?num=50对应的 feed.有新回复主题.top50: https://groups... 阅读全文

posted @ 2013-02-24 16:15 阿加 阅读(272) 评论(0) 推荐(0)

vim
摘要:关于vim中字符编码知识(encoding termencoding fileencoding fileencodings),请参考:http://edyfox.codecarver.org/html/vim_fileencodings_detection.htmlhttp://blog.csdn.... 阅读全文

posted @ 2013-02-20 14:48 阿加

find
摘要:find start_directory test options criteria_to_match action_to_perform_on_results-perm mode:文件许可正好符合mode-perm +mode:文件许可部分符合mode-perm -mode:文件许可至少符合mode忽略某个目录:如果在查找文件时希望忽略某个目录,那么可以使用-prune选项来指出需要忽略的目录。在使用-prune选项时要当心,因为如果你同时使用了-depth选项,那么-prune选项就会被find命令忽略。例如:在/apps目录下查找文件,而不再/apps/bin目录下查找,可以用:find 阅读全文

posted @ 2013-02-19 17:29 阿加 阅读(251) 评论(0) 推荐(0)

执行阶段段修饰符号,查看执行流程
摘要:2014-12-20日,该脚本弃用,因为在分析ftrace时,得到的结果有误:version one:include/linux/init.h看I2C驱动的时候,感觉有点乱,服务器挂了,没法编译,不好打桩;Makefile和Kconfig都看了下, 依据内核的头文件写了个脚本,方便查看函数执行流程。... 阅读全文

posted @ 2013-02-03 14:17 阿加

链接时指定动态库路径
摘要:生成动态链接库的时候,尝试运行,结果显示找不到动态库,使用ldd命令也查找不到,可以使用几种方法,可以看看man 8 ld.so;这里只记录了一种: gcc -o test main.o -L. -lpic -Wl,-rpath=/home/ryoma/Exercise/programmer/pic/test 阅读全文

posted @ 2013-02-02 21:21 阿加 阅读(463) 评论(0) 推荐(0)

idr 图示
摘要:看了idr的源码,思想基本同基数树一致,在网上找了几副图:图片引用自:http://blog.csdn.net/yyttiao/article/details/8164029pre_get:单层情况下的布局:在idr.layers == 1 的情况就是上面这图所示,所有的ptr都落在ary对应的地址区域...而对应得到的id值就是0到31.也就是5位..用4字节的低5位表示0到31 这32个地址对应的区域..下面再看下2层的情况从前副图中,我们总结下..在1层中,id最大值为1 << 5(32只需要5个二进制位) * 1 = 在2层中1 << 5(32只需要5个二进制位 阅读全文

posted @ 2013-02-02 18:35 阿加 阅读(289) 评论(0) 推荐(0)

基数树 radix_tree
摘要:Makefile:1 mytest: radix-tree.o test.o 2 gcc -Wall -fno-builtin $^ -o $@3 radix-tree.o: radix-tree.c4 gcc -c $^ -o $@5 test.c: test.o6 gcc -c $^ -o $@7 8 clean:9 rm radix-tree.o test.o myte... 阅读全文

posted @ 2013-02-02 12:29 阿加 阅读(1287) 评论(0) 推荐(0)

导航