[Libwebsockets] lwsac

Andy Green andy at warmcat.com
Tue Oct 16 04:31:39 CEST 2018



On 16/10/18 10:12, Per Bothner wrote:
> On 10/15/18 6:50 PM, Andy Green wrote:
>>>> or only the object last allocated in any chunk may be deallocated, 
>>>> which is what you are saying...
>>>
>>> No, that is not a restriction.
>>
>> IIUI, it actually is.
> 
> I meant the obstack API does not have the restriction that "only the 
> object last allocated in any chunk may be deallocated".
> 
>> I guess this is why it's a "stack"... you can basically pop yourself 
>> back to an earlier state freeing everything inbetween.
> 
> Yup.
> 
>>>  You might not want to use obstacks for licensing reasons (LGPL), 
>>> anyway.
>> I already wrote my own implementation from scratch, including the 
>> conception... I don't need obstack.
> 
> I was just trying to say: Assuming you don't want LGPL licensing 
> concerns, it wasn't
> wasted effort to write your own implementation.

Eh...

My implementation will likely get some use, because it's a type in 
something else that will likely get used.  That's not a new idea either, 
although again the implementation is entirely from scratch and has some 
interesting advantages.

>>> However, I do suggest adding a note like:
>>>    Lwsac is variant of the 
>>> [obstack](https://en.wikipedia.org/wiki/Obstack) data structure.
>>
>> Eh... while I'm happy to acknowledge it pre-existed what I wrote...
> 
> Well, the data structure has a "traditional" (if obscure) name.  And as 
> I wrote in my first message
> "us old-fart GNU guys" will think "is this different from an obstack?", 
> so it make sense to
> acknowledge that.

Sorry, it doesn't make sense to me to run around adapting reality to be 
comfortable for the cherished hopes and dreams of legions of putative 
old farts.

>> ... I never even heard of it until you mentioned it thismorning.  It's 
>> simply a case of a good idea getting evolved again independently.
> 
> Absolutely.
> 
>> I certainly owe Stallman, GNU for GCC and their other work, but I 
>> don't owe this any special acknowledgment.
> 
> I agree.  I just suggest a reference to the "obstack" name.

I don't see any reason to do that when I owe nothing to that code, not 
even the idea.

Something like memory management layer on top of malloc was well-trodden 
ground before I (possibly you too) was born and no doubt there were 
similar ideas and implementations before Stallman's.

Anyway, I have written enough on this.

-Andy


More information about the Libwebsockets mailing list