释放内存,防止溢出

This commit is contained in:
wangxujie-laptop 2025-02-28 14:40:45 +08:00
parent 3dbaf6dc60
commit 99c90d1740
3 changed files with 5 additions and 5 deletions

View File

@ -196,7 +196,7 @@ void start_gpio_di_do_task(void const *argument)
send_data_flag_cmd = 0;
}
}
vTaskDelay(200);
vTaskDelay(100);
}
/* USER CODE END start_gpio_di_do_task */
}

View File

@ -16,8 +16,8 @@
<TargetCommonOption>
<Device>STM32F407VGTx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F4xx_DFP.2.17.1</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<PackID>Keil.STM32F4xx_DFP.2.16.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000-0x2001BFFF) IRAM2(0x2001C000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) FPU2 CPUTYPE("Cortex-M4") TZ</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
@ -186,6 +186,7 @@
<RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>

View File

@ -88,9 +88,8 @@ static err_t tcpecho_recv_control(void *arg, struct tcp_pcb *tpcb, struct pbuf *
/*2. 判断所要执行的操作 读或写指令*/
/*3. 对要发送的数据进行校验,组包,返回数据*/
pbuf_free(p);
}
pbuf_free(p);
}
else if (err == ERR_OK) // 检测到对方主动关闭连接时也会调用recv函数此时p为空
{