Selaa lähdekoodia

处理内存未释放的bug

liyi 10 kuukautta sitten
vanhempi
commit
922fe315a5

+ 3 - 3
f427/applications/packages/mongoose-v6.7/mongoose.c

@@ -2324,9 +2324,9 @@ time_t mg_mgr_poll(struct mg_mgr *m, int timeout_ms) {
     LOG(LL_ERROR, ("cannot poll: no interfaces"));
     return 0;
   }
-	uint64_t _now;
-	_now = mg_millis();
-  mg_timer_poll(&m->timers, _now);
+//	uint64_t _now;
+//	_now = mg_millis();
+//  mg_timer_poll(&m->timers, _now);
 	
   for (i = 0; i < m->num_ifaces; i++) {
     now = m->ifaces[i]->vtable->poll(m->ifaces[i], timeout_ms);

+ 4 - 4
f427/applications/rtconfig.h

@@ -188,7 +188,7 @@
 #define RT_LWIP_UDP
 #define RT_LWIP_TCP
 #define RT_LWIP_RAW
-#define RT_MEMP_NUM_NETCONN 12
+#define RT_MEMP_NUM_NETCONN 14
 
 //#define MEM_USE_POOLS       1
 //#define PBUF_POOL_SIZE   4
@@ -196,9 +196,9 @@
 //#define RT_LWIP_PBUF_POOL_BUFSIZE  512
 
 
-#define RT_LWIP_RAW_PCB_NUM 4
-#define RT_LWIP_UDP_PCB_NUM 4
-#define RT_LWIP_TCP_PCB_NUM 4
+#define RT_LWIP_RAW_PCB_NUM 10
+#define RT_LWIP_UDP_PCB_NUM 10
+#define RT_LWIP_TCP_PCB_NUM 10
 #define RT_LWIP_TCP_SEG_NUM 40
 #define RT_LWIP_TCP_SND_BUF 8196
 #define RT_LWIP_TCP_WND 8196