kdata_buffer_alloc —
allocate immutable buffer data for plotting
#include <cairo.h>
#include <kplot.h>
struct kdata *
kdata_buffer_alloc(size_t
hintsz);
The kdata_buffer_alloc function creates a
reference-counted data sources for
kplot(3),
initially sized to hintsz with all x-values and
y-values set to zero. It's primarily used to copy other data sources into an
immutable one. Bucket values are copied into this structure via
kdata_buffer_copy(3).
kdata_buffer_alloc returns
NULL if memory allocation failed.