首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

linux停,没使用malloc,创建socket和pthread,然后close、pthread_exit,每次操作会多占用8K内存

2013-07-01 
linux下,没使用malloc,创建socket和pthread,然后close、pthread_exit,每次操作会多占用8K内存创建一个TCP的

linux下,没使用malloc,创建socket和pthread,然后close、pthread_exit,每次操作会多占用8K内存
创建一个TCP的socket,accept到一个socket,创建一个pthread,当socket的read返回0时,关闭socket并且pthread_exit
按道理内容应该无变化啊。。。
可现在每次执行一轮,也就是,连接socket,再断开,ubuntu的系统监视器,都会显示本应用的进程多占用了8K。
代码没有用malloc一类的动态分配内存,
求解啊。
[解决办法]
show me the key code
[解决办法]
无代码无真相

热点排行