[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] RE: [lwip] questions & suggestions
From: |
Adel Mamin |
Subject: |
[lwip-users] RE: [lwip] questions & suggestions |
Date: |
Wed, 08 Jan 2003 23:07:30 -0000 |
-----Original Messages-----
> I'm studying your 0.5 code now and I have a question: the function
> pbuf_pool_free(struct pbuf *p) is not recoursive (I mean it doesn't work
> if the input parameter p is the pointr to the head of the buffers chain).
> Is it right?
>I'm not sure I understand what you mean. What buffer chain?
>/adam
This is a fragment from your pbuf_alloc() function (see my question in
comments):
/* Allocate the tail of the pbuf chain. */
r = p;
rsize = size - p->len;
while(rsize > 0) {
q = pbuf_pool_alloc();
if(q == NULL) {
DEBUGF(PBUF_DEBUG, ("pbuf_alloc: Out of pbufs in pool,\n"));
#ifdef PBUF_STATS
++stats.pbuf.err;
#endif /* PBUF_STATS */
pbuf_pool_free(p); /* what if you already allocated
more than */
/* one buffer from
pbuf_pool_alloc_cache - will */
/* they all be free after
this call? */
return NULL;
}
Adel.
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] questions & suggestions, Adam Dunkels, 2003/01/08
- [lwip-users] RE: [lwip] questions & suggestions, Adel Mamin, 2003/01/08
- [lwip-users] Re: [lwip] questions & suggestions, Adam Dunkels, 2003/01/08
- [lwip-users] RE: [lwip] questions & suggestions,
Adel Mamin <=
- [lwip-users] Re: [lwip] questions & suggestions, Adam Dunkels, 2003/01/08
- [lwip-users] Re: [lwip] questions & suggestions, Adam Dunkels, 2003/01/08
- [lwip-users] RE: [lwip] questions & suggestions, Adel Mamin, 2003/01/09
- [lwip-users] RE: [lwip] questions & suggestions, Adel Mamin, 2003/01/09
- [lwip-users] Re: [lwip] questions & suggestions, Adam Dunkels, 2003/01/09