BufResize
Description
Set b’s length to exactly n bytes, growing the backing store if necessary. New bytes are zero-initialized; existing bytes past n are dropped.
Success
Returns true; b->length == n. b->data may have moved when growing.
Failure
Returns false if the underlying allocator fails to grow the buffer; *b is unchanged.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
MachO.c:439:
}
MemCopy(copy.data, data, data_size);
BufResize(©, (size)data_size);
return MachoOpenFromMemory(out, ©);
}- In
Elf.c:471:
}
MemCopy(copy.data, data, data_size);
BufResize(©, (size)data_size);
// Hand `©` to the L-form -- it consumes the local and zeros
// it. The local goes out of scope right after.
- In
Pdb.c:744:
}
MemCopy(BufData(©), data, data_size);
BufResize(©, (size)data_size);
return PdbOpenFromMemory(out, ©);
}- In
Pe.c:544:
}
MemCopy(BufData(©), data, data_size);
BufResize(©, (size)data_size);
return PeOpenFromMemory(out, ©);
}
Last updated on