// buffer.c - Example usage of buffer.h dynamic buffer #define BUFFER_IMPLEMENTATION #include "../include/buffer.h" #include #include #include int main(void) { void *buf = buffer_malloc(10, sizeof(int)); if (!buf) { fprintf(stderr, "Failed to allocate buffer\n"); return 1; } printf("capacity: %" PRIu64 "\n", buffer_capacity(buf)); printf("size: %" PRIu64 "\n", buffer_count(buf)); buffer_free(buf); return 0; }