
c & c++
朱乐乐在路上
Smile as always
展开
-
c - dereferencing pointer to incomplete type
中文错误名字叫做:提领指向不完全类型的指针 这是在我重新编译一个内核模块的时候出现的,报错的行数中都有对current宏的调用,并且涉及了taskstruct的mm成员这是由于不同内核版本代码变化导致的,只需要找到相应的文件,把struct申明相应的头文件包含进去就行了。原创 2013-04-11 15:30:16 · 891 阅读 · 0 评论 -
C语言printf输出16进制数字没有0x怎么办?
int i = 7;printf("%#010x\n", i); // gives 0x00000007printf("0x%08x\n", i); // gives 0x00000007printf("%#08x\n", i); // gives 0x000007原创 2014-12-14 21:08:26 · 20749 阅读 · 0 评论 -
exec系列函数
本节目标:exec替换进程映像exec关联函数组(execl、execlp、execle、execv、execvp)一,exec替换进程映像在进程的创建上Unix采用了一个独特的方法,它将进程创建与加载一个新进程映象分离。这样的好处是有更多的余地对两种操作进行管理。当我们创建了一个进程之后,通常将子进程替换成新的进程映象,这可以用exec系列的函数来进行。当然,exec系列的函转载 2015-01-20 18:48:32 · 3801 阅读 · 0 评论 -
malloc与free机制探索
I have a Debian with a Linux 2.6 Kernel, and I try to understand how the heap works/behaves with malloc() and free(). I tried to search for malloc() and free() algorithm and heap structure, but I转载 2015-01-21 10:26:37 · 672 阅读 · 0 评论 -
测量系统调用开销
https://courses.cs.washington.edu/courses/cse551/07sp/programming/assign1/measure_syscall.c// Copyright 2007 Steven Gribble#include #include #include #include #include #include // only转载 2015-06-10 10:30:16 · 855 阅读 · 0 评论