- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
currently using uCLinux 2.6, and thinking about using Tail Queue. Based on the example here:
http://linux.about.com/library/cmd/blcmdl3_queue.htm (http://linux.about.com/library/cmd/blcmdl3_queue.htm) Everytime an item is added, malloc is called. However, when I looked into the remove implementation, free isn't called. Question is: will this lead to memory leak eventually? I attach the TAILQ_REMOVE implementation here. # define TAILQ_REMOVE(head, elm, field) { if (((elm)->field.tqe_next) != NULL) (elm)->field.tqe_next->field.tqe_prev = (elm)->field.tqe_prev; else (head)->tqh_last = (elm)->field.tqe_prev; *(elm)->field.tqe_prev = (elm)->field.tqe_next;Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page