海王  
05 2011 档案
  • 分配内存
    摘要:http://oss.org.cn/kernel-book/ldd3/ch08.html 第 8 章 分配内存 目录 8.1. kmalloc 的真实故事 8.1.1. flags 参数 8.1.2. size 参数 8.2. 后备缓存 8.2.1. 一个基于 Slab 缓存的 scull: scullc 8.2.2. 内存池 8.3. get_free_page 和其友 8.3.1. 一个使用整... 阅读全文
    posted @ 2011-05-30 09:28 海王 阅读(392) 评论(0) 推荐(0) 编辑
  • Qt中Qstring,char,int,QByteArray之间到转换
    摘要:http://ibeyond.blog.51cto.com/1988404/37394811、各种数据类型的相互转换 char * 与 const char *的转换 char *ch1="hello11"; const char *ch2="hello22"; ch2 = ch1;//不报错,但有警告 ch1 = (char *)ch2; char 转换为 QString 其实方法有很多中,我用的是: char a='b'; QString str; str=QString(a); QString 转换为 char 方法也用很多中 QS 阅读全文
    posted @ 2011-05-10 09:13 海王 阅读(10710) 评论(0) 推荐(0) 编辑
  • struct mntent linux挂载信息读取
    摘要:http://blog.csdn.net/ling1874/archive/2010/04/22/5516313.aspx在 struct mntent 中的成员与 /etc/fstab 文件中的条目是直接对应的。它的内容如下: struct mntent {char *mnt_fsname; /* 挂载的文件系统的名字 */char *mnt_dir; /* 挂载点 */char *mnt_type; /* 文件系统类型:ufs、nfs 等 */char *mnt_opts; /* 选项,以逗号为分隔符 */int mnt_freq; /* Dump 的频率(以天为单位) */int mn. 阅读全文
    posted @ 2011-05-06 14:50 海王 阅读(4096) 评论(0) 推荐(0) 编辑
  • android让程序开机自启动
    摘要:http://blog.csdn.net/zhouyongyang621/archive/2010/10/19/5951130.aspx 定义一个BroadcastReceiver Java代码 public class BootReceiver extends BroadcastReceiver { public void onReceive(Context ctx, Intent intent... 阅读全文
    posted @ 2011-05-01 00:52 海王 阅读(2525) 评论(0) 推荐(0) 编辑