]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/backend.h
io: io_set_alloc()
[ccan] / ccan / io / backend.h
index 30a338f77a73958eaf83acad62eb87b027d27025..77d51dda9bf1825a6e02a6be85b3a0f3184c5804 100644 (file)
@@ -4,6 +4,13 @@
 #include <stdbool.h>
 #include <ccan/timer/timer.h>
 
+struct io_alloc {
+       void *(*alloc)(size_t size);
+       void *(*realloc)(void *ptr, size_t size);
+       void (*free)(void *ptr);
+};
+extern struct io_alloc io_alloc;
+
 struct fd {
        int fd;
        bool listener;