Re: TLV to memPools

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Tue, 9 Oct 2001 09:56:22 +0200

On 8 Oct 2001, at 19:28, Henrik Nordstrom <hno@marasystems.com> wrote:

> Andres Kroonmaa wrote:
>
> > > Why do we have 2 different and incompatible buffer implementations?
> > >
> > > MemBuf
> > > String
> >
> > I thought to make distinction between data buffers and strings.
> > It seems that thats not the case anymore.
>
> Which is probably the case, and makes me wonder why you are looking at
> String functions for binary TLV data?

 String functions use mem.c:memAllocBuf, which is purely variable sized
 allocator.
 The two are not the same thing. It just names the pools "Short Strings",
 etc. It could as well define pools for 4,8,16 bytes and call these "int"
 "double" and "tiny struct" pools.
 Basically what I asked is why memAllocBuf has String.c oriented checks
 while looking like general thing. To me, memAllocBuf has nothing to do
 with Strings other than pool names. Its very binary.
 It could be used everywhere where alloc size is known at both alloc
 time and free time, like is the case with TLV.
 MemBuf is yet another thing I didn't even consider.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Microlink Online
 Tel: 6501 731, Fax: 6501 725
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Tue Oct 09 2001 - 02:03:25 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:26 MST