Skip to contentSkip to conversation

ccan/membuf

PATCH Rusty Russell 1 participant 1 message Sep 17, 2018

lore
Share & tools
lore
#0 lore raw

Hi all,

I've found myself open-coding linear memory queues in several
places; particularly for strings which want memory continuity. They're pretty inefficient (realloc, memmove) for a huge number of elements, but they're great for things you expect to be small.

I'm adapting my code to use it now, but here's the patch if anyone is interested in nitpicking the API!

Cheers,
Rusty.

Subject: membuf: new module for linear memory buffers.

ccan/membuf/LICENSE new file +1 -0
new file mode 120000
index 00000000..2354d129
@@ -0,0 +1 @@
+../../licenses/BSD-MIT
\ No newline at end of file
ccan/membuf/_info new file +51 -0

51 lines not on this page · raw message

ccan/membuf/membuf.c new file +60 -0

60 lines not on this page · raw message

ccan/membuf/membuf.h new file +209 -0

209 lines not on this page · raw message

ccan/membuf/test/run.c new file +103 -0

103 lines not on this page · raw message