Menu

function

Mark Hobley

The libbuffers library provides the following functions for dynamic buffer handling.

int allocateabuffer(int size) Allocates a buffer, resizing the buffer information table as necessary
int allocatebuffer(int bufn,int size) Allocates the specified buffer
int chrtobuffer(int bufn, char c)

int chrfrombuffer(int bufn)

int scanforfreebuffer() Scans for a free slot in the buffer information table
int initbuffers() Prepares the buffer information table for first use
int freebuffer(int bufn) Deallocates a buffer and removes the entry from the buffer information table
int freeallbuffers() Deallocates all dynamic buffers and removes the buffer information table from memory
int growbuffertable() Increases the size of the buffer information table by an additional number of entries (known as a tablechunk)
int resizebuffer(int bufn, int size) Resizes the specified buffer to the size provided
int wipebufferinfo(int bufn) Erases a record from the buffer information table
int wipeallbufferinfo() Erases all entries from the buffer information table


MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.