问题,值得研究 申请内存不释放没有问题
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++) { ; } }
相关文章推荐
- Corneerstone (svn)解决项目上传后,.a文件缺失问题解决记录
- Day Seven(Beta)
- 实现ios手机QQ空间导航栏控制器时隐时现效果,kvo的应用
- html table
- linux 下查看系统资源和负载,以及性能监控
- Linux display subsytem(1)_概述
- OpenGL超级宝典7th简体中文-第二章前奏-开发环境的搭建
- cf 547B. Mike and Feet dp
- Android Scroll分析--实现滑动的七种方法
- bindService 实现音乐播放的功能
- 通过BroadcastReceiver和 service 实现开机自动启动
- 轻松解决ubuntu系统引导问题
- cf519D . A and B and Interesting Substrings 数据结构map
- vim插件之ack
- Angularjs最佳实践一----Angularjs基础
- vim基础学习之搜索功能
- 用友ERP-供应链2-基础信息
- 用友ERP-供应链2-基础信息
- Android笔记(六十二)网络框架volley
- Swift之便利构造函数