JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

ffi/pointer-buffer

core-api


    cfunction
    src/core/ffi.c on line 1863, column 1

    (ffi/pointer-buffer ptr capacity &opt n offset)

    Create a buffer from a pointer `ptr`. The underlying memory of the 
    buffer will not be reallocated or freed by the garbage collector, 
    allowing unmanaged, mutable memory to be manipulated with buffer 
    functions. Attempts to resize or extend the buffer beyond its 
    initial capacity will raise an error. As with many FFI functions, 
    this is memory unsafe and can potentially allow out of bounds 
    memory access. Returns a new buffer.


0 examplesSign in to add an example
Loading...