您的位置:首页 > 其它

问题,值得研究 申请内存不释放没有问题

2015-12-18 02:29 316 查看
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>

#define LEN1 4294967295
#define LEN2 1024

void strcopy(char *f, char *t);

char *from;
char *to;
int main(int argc, char *argv[])
{
int i = 0;
char *arr[1024];
while (1) {
char *x = (char *)malloc(LEN1 * sizeof(char));
char *x1 = (char *)malloc(LEN1 * sizeof(char));
char *x2 = (char *)malloc(LEN1 * sizeof(char));
char *x3 = (char *)malloc(LEN1 * sizeof(char));
char *x4 = (char *)malloc(LEN1 * sizeof(char));
char *x5 = (char *)malloc(LEN1 * sizeof(char));
printf("%d\n", ++i);
}
scanf("%s", from);

strcopy(from, to);
return  0;
}
void strcopy(char *f, char *t)
{
while (*t++ = *f++) {
;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: