frame/buffer
src/frame/buffer.tur
defn
buffer-alloc
(buffer-alloc [n : int] :)
allocate a 64-byte-aligned buffer of n bytes.
Parameters
| n | requested size in bytes (rounded up to a multiple of 64) |
Returns
:int opaque handle to the data region, or 0 on allocation failure. Free with buffer-free.
Example
(let [p (buffer-alloc 1024)] (buffer-free p))
Since: FR0
defn
buffer-free
(buffer-free [p : int] :)
free a buffer returned by buffer-alloc.
Since: FR0
defn
buffer-size
(buffer-size [p : int] :)
bytes available in a buffer (the rounded-up size).
Since: FR0
defn
buffer-copy
(buffer-copy [dst : int src : int offset : int n : int] :)
copy n bytes from src to dst at the given dst offset.
Since: FR0
defn
bitmap-alloc
(bitmap-alloc [n : int] :)
allocate a validity bitmap for n rows, initialized to all-valid (1s).
Since: FR0
defn
bitmap-set
(bitmap-set [p : int i : int v : int] :)
set bit i of a bitmap to v (0 or 1).
Since: FR0
defn
bitmap-get
(bitmap-get [p : int i : int] :)
read bit i of a bitmap; returns 0 or 1.
Since: FR0
defn
bitmap-null-count
(bitmap-null-count [p : int n : int] :)
count zero bits in the first n positions.
Since: FR0