Chinaunix首页 | 论坛 | 博客
  • 博客访问: 476541
  • 博文数量: 133
  • 博客积分: 1235
  • 博客等级: 少尉
  • 技术积分: 1201
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-08 19:59
文章分类

全部博文(133)

文章存档

2023年(12)

2022年(3)

2018年(2)

2017年(4)

2016年(4)

2015年(42)

2014年(1)

2013年(12)

2012年(16)

2011年(36)

2010年(1)

发布时间:2015-04-29 15:36:33

Problem 1 : Is it a loop ? (判断链表是否有环?)Assume that wehave a head pointer to a link-list. Also assumethat we know the list is single-linked. Can you come up an algorithm to checkwhether this link list includes a loop by using O(n) time and O(1) space wheren is the length of the l.........【阅读全文】

阅读(989) | 评论(0) | 转发(0)

发布时间:2015-04-29 15:22:16

Tool GDBExamining Memory (data or in machine instructions)You can use the command x (for “examine”) to examine memory in any of several formats, independently of your program's data types.x/nfu addrx addrxn, the repeat countThe repeat count is a decimal integer; the d.........【阅读全文】

阅读(6301) | 评论(0) | 转发(0)

发布时间:2015-04-29 15:11:12

http://www.cnblogs.com/zhenjing/archive/2011/07/04/filelock.html缘起因项目需要,自行设计一套通用的文件读写锁,要求该机制能用于本地文件系统和NFS文件系统。内核的文件数据结构内核中有3个数据结构和文件直接相关,分别是:file descriptor table, file table and i-node table。其中file descriptor.........【阅读全文】

阅读(1094) | 评论(0) | 转发(0)

发布时间:2015-04-29 15:08:27

http://www.cnblogs.com/zhenjing/archive/2011/07/15/process_mutex_race.html缘起在linux编程中,经常有这样的要求:特定进程(尤其是daemon进程)有且只有一个,即特定资源只能由一进程拥有。问题是:如何保证特定进程间的“互斥”关系(只有一个实例)?当检测到“互斥(锁定)”时,其余进程可直接退出,而无需同步.........【阅读全文】

阅读(862) | 评论(0) | 转发(0)

发布时间:2015-04-29 14:56:48

http://outofmemory.cn/wr/?u=http%3A%2F%2Fwww.nosqlnotes.net%2Farchives%2F183分享两个GDB的小技巧:1, GDB失效时手工得到stack;2, GDB执行用户命令脚本;调试内存型服务程序的有时会遇到core dump或死锁问题,且gdb或者pstack都无法显示调用栈(call stack)。这是因为线程的调用栈被破坏了,而调用栈.........【阅读全文】

阅读(830) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册