[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Purpose of pool memory allocator
From: |
K.J. Mansley |
Subject: |
Re: [lwip-devel] Purpose of pool memory allocator |
Date: |
18 Mar 2004 09:30:10 +0000 |
On Wed, 2004-03-17 at 23:00, address@hidden wrote:
> I am beginning to question the need for a pool allocator in lwIP, so I
> thought I'd see what others thought about it.
I'm in favour of it, but then I use lwIP in a distinctly non-lightweight
environment (>1G of RAM) and so don't have many of the concerns that
embedded users might. As lwIP is intended to be useful on embedded
systems, your ideas may be more relevant than mine!
The reason I prefer the pool is simply down to performance: performing a
malloc is a relatively expensive operation, and so I don't want to have
to do any on the data path. The pool is wasteful of memory (that's how
it saves CPU overhead) though.
Perhaps the best solution would be to offer both choices? Mapping all
the pool operations to malloc() or free() (or whatever your system
happens to have) should be fairly straightforward.
Kieran