Dear:
当局域网通讯的时候,用system_get_free_heap_size()得到heap的大小一直不变的,通讯稳定;
但是连上互联网的时候,heap空间慢慢的就变小了,直到最后程序僵死在那。
请问这是什么原因引起的,有什么解决方法吗?谢谢
另外,大的局部变量已经用的zalloc()和free()。
Best Regards
heap问题请教
Re: heap问题请教
Postby jalen » Tue Nov 29, 2016 3:51 pm
ESP_Xutao wrote:你好:
这个可能是在连互联网时申请的堆没有释放掉,你可以在相应的zalloc()或free()前后用system_get_free_heap_size()查看heap有没有释放掉。
你好:
局域网和互联网的程序是一样的,只是改了下服务器的IP地址,其余都是一样的。
连接网络时也没有申请堆,就一个connect()函数,只是用的短连接,2秒钟连接一次。
PS:我上面说的局域网是指在同一网段,跨网段heap也会慢慢变小,最终僵死。
望指教,谢谢
Who is online
Users browsing this forum: No registered users and 58 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.