Buffer.findMemory

Find the memory blocks that span @size bytes starting from @offset in @buffer.

When this function returns %TRUE, @idx will contain the index of the first memory bock where the byte for @offset can be found and @length contains the number of memory blocks containing the @size remaining bytes. @skip contains the number of bytes to skip in the memory bock at @idx to get to the byte for @offset.

@size can be -1 to get all the memory blocks after @idx.

class Buffer
bool
findMemory
(
size_t offset
,
size_t size
,
out uint idx
,
out uint length
,
out size_t skip
)

Parameters

offset size_t

an offset

size size_t

a size

idx uint

pointer to index

length uint

pointer to length

skip size_t

pointer to skip

Return: %TRUE when @size bytes starting from @offset could be found in @buffer and @idx, @length and @skip will be filled.

Meta