Function bufferAlignedAllocUnsafe

  • Creates a new buffer not initialized with the given size and alignment. If alignment is not specified, the default alignment of 32 is used. The buffer does not come from the nodejs buffer pool, it is allocated using aligned_malloc.

    Is the same as Buffer.allocUnsafe but is aligned. We need an aligned buffer to create a roaring bitmap frozen view.

    WARNING: this function is unsafe because the returned buffer may contain previously unallocated memory that may contain sensitive data.

    Parameters

    • size: number

      The size of the buffer to allocate.

    • Optional alignment: number

      The alignment of the buffer to allocate.

    Returns Buffer

Generated using TypeDoc