Maybe something like Zig's SegmentedList[1] would fit?
[1]
https://github.com/ziglang/zig/blob/master/lib/std/segmented_list.zig
Em dom., 5 de mai. de 2024 às 14:52, Laurent Bercot
<ska-skaware_at_skarnet.org> escreveu:
>
> >If a single s6-ftrigrd is requested to listen on many listeners, the
> >genalloc_readyplus may have to move the ftrigio's to a new memory area,
> >causing the char* inside their buffer to get outdated, overwriting
> >unrelated memory areas when filling the buffers and possibly triggering
> >a SIGSEGV.
>
> You're right that this needs to be fixed but I don't like the
> solution. I never was a fan of updating b.c.x in the first place; I was
> okay with this hack as long as it was easy to keep the buffer and the
> pointer to the buffer in sync, but since reallocations are now
> unpredictable I'll find another way of doing it.
> Thanks for the report.
>
> --
> Laurent
>
Received on Sun May 05 2024 - 19:59:33 CEST