lwIP - A Lightweight TCP/IP stack - Patches: patch #5687, api_lib.c: allocate all 'struct...
You are not allowed to post comments on this tracker with your current authentication level.
patch #5687: api_lib.c: allocate all 'struct api_msg' on stack instead of mem-pool
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Mon 15 Jan 2007 10:01:39 AM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | kieranm | Open/Closed: | Closed |
Planned Release: | None |
Wed 28 Feb 2007 03:32:17 PM UTC, comment #3: |
Frédéric Bernon <fbernon> |
Wed 28 Feb 2007 02:15:56 PM UTC, comment #2: I have applied this patch but had to strip the windows newline characters before it would succeed.
|
Kieran Mansley <kieranm> |
Mon 19 Feb 2007 10:50:46 AM UTC, comment #1: I think this should go in. Any objections? |
Kieran Mansley <kieranm> |
Mon 15 Jan 2007 10:01:39 AM UTC, original submission:
The messages passed between application thread and tcpip thread can be allocated on the stack instead of through memp_malloc(), which should minimize memory usage (struct api_msg is about 24 bytes, only one at a time is allocated per thread) and should be (a little bit) faster (since allocating on the stack is faster that memp_malloc()).
|
Simon Goldschmidt <goldsimon> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-02-28 | kieranm | Status | None | Done | |
Open/Closed | Open | Closed | |||
2007-02-19 | kieranm | Assigned to | None | kieranm | |
2007-01-15 | goldsimon | Attached File | - | Added patch_MEMP_API_MSG.patch, #11755 | |
Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-4448.
Corresponding source code
Isn't be better to directly use the api_msg, without using the api_msg* ?
There is more changes, but call would be a little bit simplest. Example with netconn_disconnect:
err_t
netconn_disconnect(struct netconn *conn)
{
struct api_msg msg;
if (conn == NULL) {
return ERR_VAL;
}
msg.type = API_MSG_DISCONNECT;
msg.msg.conn = conn;
api_msg_post(&msg);
sys_mbox_fetch(conn->mbox, NULL, 0);
return conn->err;
}