代码拉取完成,页面将自动刷新
hostname代码的localhost()函数里分配了128字节的内存,如下图所示:
show_name()函数调用localhost()函数来打印用户名之后直接退出了,并没有去释放内存,如下图所示:
为了防止内存泄漏,应该在退出程序前把内存给释放掉,如下图所示:
Hi binlingyu, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Networking, and any of the maintainers: @luzhihao , @Apricity , @robertxw , @孙苏皖 , @renmingshuai , @jinag12
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论