|
From: | Vincent Cui |
Subject: | Re: [lwip-users] demo web refresh down |
Date: | Sat, 23 Aug 2014 09:37:15 +0000 |
Hi : For netconn API, the following netbuf_delete api will free inbuf memory without delay ? http_server_netconn_serve(struct
netconn *conn) {
struct netbuf *inbuf;
err_t err; err = netconn_recv(conn, &inbuf);
if (err != ERR_OK)
return; netconn_write(conn, http_html_hdr,
sizeof(http_html_hdr)-1, NETCONN_NOCOPY); netconn_write(conn, http_index_html,
sizeof(http_index_html)-1, NETCONN_NOCOPY); netconn_close(conn);
netbuf_delete(inbuf); } From: lwip-users-bounces+address@hidden
[mailto:lwip-users-bounces+address@hidden On Behalf Of
Vincent Cui Hi By check
http://www.lpcware.com/content/faq/malloc-failure-using-freertos-heap3c-lpcxpresso-tool-chain I found that heap is real overfollow once more request coming in frequency. More memory is not free on time. In real application, FreeRTOS and LWIP also use C lib malloc and free function in case of
1.
Freertos use heap3.c
2.
popt.h define #define
MEM_LIBC_MALLOC 1 #define MEMP_MEM_MALLOC 1 How to fix the issue of heap overflow ? Vincent
P
please consider the environment before printing this email
From: Vincent Cui
Hi: I define following to use system malloc and free #define
MEM_LIBC_MALLOC 1 #define MEMP_MEM_MALLOC 1 I found that the malloc memory is not free on time, so malloc failure in new request coming. It seems to need some protect those . Am I right ? Vincent From: Vincent Cui
All: I use LPCXPRESSO to develop a simple demo server with NETCONN api on LPC1769 If the demo server refresh itself per 3 second, it works well. If I refresh it by press F5 frequencely, it halt and can’t connect to host.. Who know the reason ? Vincent |
[Prev in Thread] | Current Thread | [Next in Thread] |