lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [task #6957] make mem_free work with NO_SYS=1 to free pbufs


From: Simon Goldschmidt
Subject: [lwip-devel] [task #6957] make mem_free work with NO_SYS=1 to free pbufs from interrupt context
Date: Fri, 08 Jun 2007 16:48:48 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Follow-up Comment #1, task #6957 (project lwip):

> We could solve this by looking if the heap is blocked and return
> 0 on mem_malloc if so (that shouldn't happen so often since you
> don't alloc from a heap in interrupt context). mem_free could put
> the mem-structs on some kind of list that gets freed if the other
> context leaves the blocked region. That blocking could be done
> with a 'bool' that is locked by SYS_ARCH_PROTECT. 

Maybe the idea isn't that good after all: we would need a call to
memp_malloc() to create a list item for a struct mem to be freed.

So maybe it's simpler to move to creating pools for mem_malloc instead of the
slow heap.

Any comments on this general problem?
We could also leave it like it is and document the limitation (not being able
to free PBUF_RAM pbufs in interrupt context)...

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?6957>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]