自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (1)
  • 收藏
  • 关注

原创 CSAPP学习日志之系统IO举例分析

有关系统IO的举例分析说明首先是一个关于IO重定向和只读的例子#include "csapp.h"int main(int argc, char *argv[]){ int fd1, fd2, fd3; char c1, c2, c3; char *fname = argv[1]; fd1 = Open(fname, O_RDONLY, 0); ...

2019-12-08 14:22:37 177

原创 CSAPP学习日志之部分fork函数

有关fork函数的举例说明先来看一个简单的例子/* * fork2 - Two consecutive forks * Both parent and child can continue forking * Ordering undetermined */void fork2(){ printf("L0\n"); fork(); printf("L1\...

2019-12-08 11:50:30 145

原创 CSAPP学习日志之链接

首先,我们来看一个经典例子hello.c的可执行文件的生成过程。hello.c是通过一系列处理过程才得到最终可被机器执行的程序文件,其中的链接过程就是这次学习的重点。链接链接过程将多个可重定位目标文件合并以生成可执行目标文件。在Linux中使用ELF格式描述目标文件。在这里我想通过一个例子来帮助理解链接过程的目标文件ELF格式:在此先附上可重定位目标文件和可执行目标文件的ELF格式图...

2019-11-30 11:48:06 155

原创 CSAPP实验之bufdemo.c

bufdemo代码/* Demonstration of buffer overflow */#include <stdio.h>#include <stdlib.h>/* Implementation of library function gets() */char *gets(char *dest){ int c = getchar(); char...

2019-05-31 15:56:48 140

原创 CSAPP实验之runaway.c

runaway代码/* Example of deep recursion */#include <stdio.h>#include <stdlib.h>int recurse(int x) { int a[1<<15]; /* 4 * 2^15 = 64 KiB */ printf("x = %d. a at %p\n", x,...

2019-05-30 00:49:40 216

原创 CSAPP实验之fsum.c

fsum代码#include <stdio.h>#include <stdlib.h>#include <string.h>#define BUFSIZE 256int main(int argc, char *argv[]) { char prefix[BUFSIZE]; char next[BUFSIZE]; int i; ...

2019-05-29 15:22:08 241

原创 CSAPP实验之show-bytes.c

show-bytes代码/* show-bytes - prints byte representation of data *//* $begin show-bytes */#include <stdio.h>/* $end show-bytes */#include <stdlib.h>#include <string.h>/* $begin ...

2019-05-28 22:02:00 555

原创 CSAPP实验之sq.c

sq代码#include <stdio.h>#include <stdlib.h>int sq(int x) { return x*x;}int main(int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) { int x = atoi(argv[i]); int...

2019-05-28 13:24:40 190

原创 CSAPP实验之struct.c

struct代码#include <stdio.h>#include <stdlib.h>typedef struct { int a[2]; double d;} struct_t;double fun(int i) { volatile struct_t s; s.d = 3.14; s.a[i] = 107374182...

2019-05-27 23:56:19 160

从零开始搭建个人博客系统.md

从零开始搭建个人博客系统.md

2021-06-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除