上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页
摘要: 从毕业到现在,在从事软件行业三年的时间里,经历了很多,也成长了很多,从一个笨笨嗑嗑的毕业生到现在能独立工作完成任务的程序员,这个过程并非是一帆风顺的,好多次都是到了逆境的尽头一转弯又重见新的希望,我相信哪个行业都是这样,人都是需要不断磨炼的才能成长起来的,而最能磨炼人时候的就是身处逆境的时候。 这几年的时间,因为各种原因,我换过三家公司,而这三家公司都是不同性质的公司,第一家国企,第二家民企,现在这家外企,暂且不说三年换三家公司这个企业忠诚度问题,这里面有公司的原因也有自己的考虑,频繁跳槽并不是好事,对于一个刚入行的程序员来说这确实能在一定程度上打开眼界,我个人认为,刚工作的几年中是进步最.. 阅读全文
posted @ 2012-10-23 17:09 beanmoon 阅读(568) 评论(0) 推荐(0) 编辑
摘要: cpio命令利用cpio 可将文件或目录从文件库获取出来或将散列文件拷贝到文件库。cpio 的指令格式:cpio –i[bcdmrtuv] [patterns]cpio –o [abcv]cpio –p [adlmuv][directory]cpio有三种操作模式: 在copy-out模式中,cpio把文件复制到归档包中。它从标准输入获得文件名列表(一行一个),把归档包写到标准输出。生成文件名列表的典型方法是使用find命令;你可能要在find后面用上-depth选项,减少因为进入没有访问权限的目录而引起的麻烦。 在copy-in模式中,cpio从归档包里读取文件,或者列出归档包里的内容。.. 阅读全文
posted @ 2012-10-23 15:25 beanmoon 阅读(806) 评论(0) 推荐(0) 编辑
摘要: 5.8. Standard I/O EfficiencyUsing the functions from the previous section, we can get an idea of the efficiency of the standard I/O system. The program inFigure 5.4is like the one inFigure 3.4: it simply copies standard input to standard output, usinggetcandputc. These two routines can be implemente 阅读全文
posted @ 2012-10-23 15:23 beanmoon 阅读(195) 评论(0) 推荐(0) 编辑
摘要: BufferingThe goal of the buffering provided by the standard I/O library is to use the minimum number ofreadandwritecalls. (RecallFigure 3.5, where we showed the amount of CPU time required to perform I/O using various buffer sizes.) Also, it tries to do its buffering automatically for each I/O strea 阅读全文
posted @ 2012-10-23 15:23 beanmoon 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1.出处fflush是libc.a中提供的方法,fsync是系统提供的系统调用。2.原形fflush接受一个参数FILE *.fflush(FILE *);fsync接受的时一个Int型的文件描述符。fsync(int fd);3.功能fflush:是把C库中的缓冲调用write函数写到磁盘[其实是写到内核的缓冲区]。fsync:是把内核缓冲刷到磁盘上。c库缓冲-----fflush---------〉内核缓冲--------fsync-----〉磁盘另外关于内核缓冲,标准库缓冲和用户空间缓冲的说法见APUE 5.14:One inefficiency inherent in the stan 阅读全文
posted @ 2012-10-23 15:22 beanmoon 阅读(694) 评论(0) 推荐(0) 编辑
摘要: When a C program is executed by the kernelby one of theexecfunctions, which we describe inSection 8.10.a special start-up routine is called before themainfunction is called. The executable program file specifies this routine as the starting address for the program; this is set up by the link editor 阅读全文
posted @ 2012-10-23 15:21 beanmoon 阅读(192) 评论(0) 推荐(0) 编辑
摘要: There are eight ways for a process to terminate. Normal termination occurs in five ways:Return frommainCallingexitCalling_exitor_ExitReturn of the last thread from its start routine (Section 11.5)Callingpthread_exit(Section 11.5) from the last threadAbnormal termination occurs in three ways:Callinga 阅读全文
posted @ 2012-10-23 15:20 beanmoon 阅读(335) 评论(0) 推荐(0) 编辑
摘要: ISO C specifies three functions for memory allocation:malloc, which allocates a specified number of bytes of memory. The initial value of the memory is indeterminate.calloc, which allocates space for a specified number of objects of a specified size. The space is initialized to all 0 bits.realloc, w 阅读全文
posted @ 2012-10-23 15:19 beanmoon 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Historically, a C program has been composed of the following pieces:Text segment, the machine instructions that the CPU executes. Usually, the text segment is sharable so that only a single copy needs to be in memory for frequently executed programs, such as text editors, the C compiler, the shells, 阅读全文
posted @ 2012-10-23 15:19 beanmoon 阅读(238) 评论(0) 推荐(0) 编辑
摘要: volatile 影响编译器编译的结果,指出,volatile 变量是随时可能发生变化的,与volatile变量有关的运算,不要进行编译优化,以免出错。例如:volatile int i=10;int j = i;...int k = i;volatile 告诉编译器i是随时可能发生变化的,每次使用它的时候必须从i的地址中读取,因而编译器生成的可执行码会重新从i的地址读取数据放在k中。而优化做法是,由于编译器发现两次从i读数据的代码之间的代码没有对i进行过操作,它会自动把上次读的数据放在k中。而不是重新从i里面读。这样以来,如果i是一个寄存器变量或者表示一个端口数据就容易出错,所以说volat 阅读全文
posted @ 2012-10-23 15:18 beanmoon 阅读(204) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页