#include <iostream>
#include <sys/types.h>
#include <unistd.h>
#include <cstdio>
using namespace std;
int main()
{
//i find the size of buffer is 512B
for(int i=0;i<513;i++)printf("%c ",'a');
while(1)
{
}
/*
for(int i=0;i<2;i++)
{
fork();
printf("%d ",i);
}
*/
//printf("%d\n%d\n",getpid(),getppid());
return 0;
}
缓冲区的一些测试代码
最新推荐文章于 2024-04-11 00:20:44 发布