- 博客(26)
- 收藏
- 关注
原创 linux kernel delay
如何在内核中精确的延时? 内核文档有专门介绍如何delay的用法。 一个是Atomic Context情况,比如中断上下文。由于Atomic Context是不能出现进程调度的,因为有可能会让系统一直睡下去,成了植物PC。。。。所以这种情况的延时采取的都是busy wait的方式。有三个函数可以调用,分别是ndelay(), udelay(), mdelay()
2014-02-27 09:31:04 1066
转载 文件指针/句柄(FILE*)、文件描述符(fd)以及 文件路径(filepath)的相互转换
文件指针/句柄(FILE*)、文件描述符(fd)以及 文件路径(filepath)的相互转换转载于糨糊的专栏最近在linux下编程常需要对一些文件进行操作。有时不同的条件下,需要将文件指针/句柄(FILE*)、文件描述符(fd)以及文件路径(filepath)进行相互转换,以满足实际的编程需要。现简单的做一下整理。如下。 1:文件路径 文件描述符应
2013-02-16 15:25:49 424
转载 linux kernel 和内存方面的文档链接
Linux Kernel HTML DocumentationLinux Journal MagazineUnderstand The Linux Virtual Memory ManagerWhat every programmer should know about memoryArs technica ram guide
2013-02-16 15:04:48 224
转载 libevent
libevent – an event notification libraryFast portable non-blocking network programming with Libevent
2013-02-14 21:22:14 310
转载 TLS wiki (Thread-local_storage)
http://en.wikipedia.org/wiki/Thread-local_storage
2013-02-14 20:21:42 391
转载 libwebsockets – HTML5 Websocket server library in C
libwebsockets – HTML5 Websocket server library in C
2013-02-14 20:10:32 1820
转载 CodeProject "Computational Geometry, C++ and Wykobi"
http://www.codeproject.com/Articles/22568/Computational-Geometry-C-and-Wykobi
2013-02-14 16:05:22 511
原创 c++ 为什么要引入 "引用&"
《The Design and Evolution of C++》, 3.7 References 说到“References were introduced primarily to support operator overloading.”
2013-02-14 15:52:00 522
转载 C++ placement new 的使用方法
转自:http://www.programfan.com/club/showtxt.asp?id=320940placement new的含义placement new 是重载operator new 的一个标准、全局的版本,它不能够被自定义的版本代替(不像普通版本的operator new 和 operator delete能够被替换)。void *operator new(
2013-02-14 15:47:22 274
原创 遇到bug了,第一步做什么
遇到一个bug了,第一步应该做什么?如果这个bug非常容易解决,可能直接查看出错信息即可解决。但是很多时候遇到的bug很难复现,甚至多了一条log信息,时序不同了bug便不再复现,那么首要问题便是如何方便快速的复现该bug。
2013-01-01 14:57:38 277
原创 linux 进程内存使用情况观测
cat /proc/pid/status 查看VmRSS 值的大小。ps aux 一项的RSS 也可以查看应用程序内存使用情况
2013-01-01 14:10:07 280
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人