MemSet
Description
Set memory region to a value. A zero byte count returns dst without writing to it.
Parameters
| Name | Direction | Description |
|---|---|---|
dst |
out | Destination memory region. |
val |
in | Byte value to write (low 8 bits used). |
n |
in | Number of bytes to set. |
Success
Returns destination pointer.
Failure
Aborts via LOG_FATAL when n > 0 and dst is NULL.
Usage example (Cross-references)
Usage examples (Cross-references)
__attribute__((used)) void *memset(void *dst, int c, freestanding_size_t n) {
MemSet(dst, c, (size)n);
return dst;
} # if !PLATFORM_WINDOWS
__attribute__((used)) void bzero(void *dst, freestanding_size_t n) {
MemSet(dst, 0, (size)n);
}
# endif- In
Memory.c:73:
}
void *MemSet(void *dst, i32 val, size n) {
if (n == 0) {
return dst;- In
Page.c:347:
page_table_remove_sorted_at(self->free_entries, &self->free_len, hit);
if (zeroed) {
MemSet(ptr, 0, rounded);
}
result = ptr;- In
Page.c:529:
os_page_unmap(&self->base, self->free_entries, self->free_entries_bytes);
}
MemSet(self, 0, sizeof(*self));
}- In
Budget.c:154:
void *slot = self->slots + (size)idx * self->slot_size;
if (zeroed)
MemSet(slot, 0, self->slot_size);
#if FEATURE_ALLOC_STATS
// bytes_in_use tracks slot_size (what budget_allocator_deallocate
- In
Budget.c:255:
// The caller still owns `buf`; just wipe our header so any
// post-deinit dispatch trips ValidateAllocator on zero __magic.
MemSet(self, 0, sizeof(*self));
}- In
Heap.c:737:
heap->retention_bytes -= (u64)total;
if (zeroed)
MemSet(ptr, 0, total);
} else {
ptr = os_page_map(&heap->base, total);- In
Heap.c:813:
effective = heap_class_size[cls];
if (zeroed) {
MemSet(out, 0, effective);
}
}- In
Heap.c:1125:
if (self->recycle)
os_page_unmap(&self->base, self->recycle, os_page_round_up((size)self->recycle_cap * sizeof(void *)));
MemSet(self, 0, sizeof(*self));
}- In
Debug.c:245:
DebugRecord rec;
MemSet(&rec, 0, sizeof(rec));
rec.requested_size = bytes;
rec.padded_size = padded;- In
Debug.c:498:
// `self->page` was never used and has no live state to release.
MemSet(self, 0, sizeof(*self));
}- In
Arena.c:130:
// unconditionally on the in-chunk path.
if (zeroed) {
MemSet(out, 0, padded);
}
result = out;- In
Arena.c:334:
chunk = next;
}
MemSet(self, 0, sizeof(*self));
}- In
Slab.c:296:
void *slot = (u8 *)self->slabs[i] + ((size)slot_idx << self->slot_size_shift);
if (zeroed) {
MemSet(slot, 0, self->slot_size);
}
#if FEATURE_ALLOC_STATS- In
Slab.c:329:
void *slot = self->slabs[idx];
if (zeroed) {
MemSet(slot, 0, self->slot_size);
}
#if FEATURE_ALLOC_STATS- In
Slab.c:449:
);
}
MemSet(self, 0, sizeof(*self));
}- In
BitVec.c:95:
AllocatorFree(bitvec->allocator, bitvec->data);
}
MemSet(bitvec, 0, sizeof(*bitvec));
}- In
BitVec.c:102:
bitvec->length = 0;
if (bitvec->data && bitvec->byte_size > 0) {
MemSet(bitvec->data, 0, bitvec->byte_size);
}
}- In
BitVec.c:119:
if (new_bytes > old_bytes) {
MemSet(bitvec->data + old_bytes, 0, new_bytes - old_bytes);
}- In
BitVec.c:151:
if (new_byte_size > bitvec->byte_size) {
MemSet(new_data + bitvec->byte_size, 0, new_byte_size - bitvec->byte_size);
}- In
BitVec.c:955:
// Zero first so the OR-in loop below can leave 0-bits implicit.
MemSet(bytes, 0, bytes_to_copy);
for (u64 i = 0; i < bv->length && i / 8 < bytes_to_copy; i++) {- In
Graph.c:124:
graph->copy_deinit(data, graph->allocator);
} else {
MemSet(data, 0, item_size);
}- In
Graph.c:465:
deinit_vec(GENERIC_VEC(&graph->pending_edge_removals), sizeof(GraphPendingEdgeRemoval));
MemSet(graph, 0, sizeof(*graph));
}- In
Graph.c:618:
if (node_id && !graph->copy_init) {
MemSet(item_data, 0, item_size);
}- In
List.c:21:
clear_list(list, item_size);
MemSet(list, 0, sizeof(*list));
}- In
List.c:124:
MemCopy((u8 *)removed_data + c * item_size, node->data, item_size);
MemSet(node->data, 0, item_size);
AllocatorFree(list->allocator, node->data);
node->data = NULL;- In
List.c:136:
list->copy_deinit(node->data, list->allocator);
} else {
MemSet(node->data, 0, item_size);
}- In
Vec.c:66:
}
} else {
MemSet(vec->data, 0, aligned_size * (vec->capacity + 1));
}- In
Vec.c:75:
// __magic at the next validate call instead of silently dispatching
// into freed pointers.
MemSet(vec, 0, sizeof(*vec));
}- In
Vec.c:91:
}
} else {
MemSet(vec->data, 0, aligned_size * (vec->capacity + 1));
}
}- In
Vec.c:118:
}
vec->data = (char *)ptr;
MemSet(ptr + old_capacity * aligned_size, 0, aligned_size * (n + 1 - old_capacity));
vec->capacity = n;
MAGIC_MARK_DIRTY(vec);- In
Vec.c:243:
for (size i = 0; i < count; i++) {
if (vec->copy_init) {
MemSet(vec_ptr_at(vec, idx + i, item_size), 0, item_size);
if (!vec->copy_init(vec_ptr_at(vec, idx + i, item_size), item_data + i * item_size, vec->allocator)) {
for (size s = 0; s < inserted_count; s++) {- In
Vec.c:249:
}
MemSet(vec_ptr_at(vec, idx, item_size), 0, count * aligned_size);
if (idx < vec->length) {
MemMove(- In
Vec.c:256:
(vec->length - idx) * aligned_size
);
MemSet(vec_ptr_at(vec, vec->length, item_size), 0, count * aligned_size);
}- In
Vec.c:269:
vec->length += count;
MemSet(vec_ptr_at(vec, vec->length, item_size), 0, item_size);
return true;
}- In
Vec.c:318:
for (size i = 0; i < count; i++) {
if (vec->copy_init) {
MemSet(vec_ptr_at(vec, idx + i, item_size), 0, item_size);
if (!vec->copy_init(vec_ptr_at(vec, idx + i, item_size), item_data + i * item_size, vec->allocator)) {
for (size s = 0; s < inserted_count; s++) {- In
Vec.c:332:
}
MemSet(vec_ptr_at(vec, vec->length, item_size), 0, aligned_size * count);
return false;
}- In
Vec.c:343:
vec->length += count;
MemSet(vec_ptr_at(vec, vec->length, item_size), 0, item_size);
return true;
}- In
Vec.c:373:
}
} else {
MemSet(vec_ptr_at(vec, start, item_size), 0, count * vec_aligned_size(vec, item_size));
}
}- In
Vec.c:385:
(vec->length - start - count) * vec_aligned_size(vec, item_size)
);
MemSet(vec_ptr_at(vec, (vec->length - count), item_size), 0, count * vec_aligned_size(vec, item_size));
vec->length -= count;- In
Vec.c:389:
vec->length -= count;
MemSet(vec_ptr_at(vec, vec->length, item_size), 0, item_size);
}- In
Vec.c:415:
}
} else {
MemSet(vec_ptr_at(vec, start, item_size), 0, count * vec_aligned_size(vec, item_size));
}
}- In
Vec.c:437:
}
MemSet(vec_ptr_at(vec, vec->length - count, item_size), 0, count * vec_aligned_size(vec, item_size));
vec->length -= count;- In
Vec.c:443:
// Keep the post-length sentinel slot zeroed so VecBegin-returned arrays
// are safe to treat as NUL-terminated where the element type allows.
MemSet(vec_ptr_at(vec, vec->length, item_size), 0, item_size);
}- In
Vec.c:526:
if (vec->data) {
MemSet(vec_ptr_at(vec, vec->length, item_size), 0, item_size);
}- In
Str.c:142:
clone_allocator = alloc ? (Allocator *)alloc : src->allocator;
MemSet(dst, 0, sizeof(Str));
*dst = StrInit(clone_allocator);
dst->copy_init = src->copy_init;- In
Map.c:213:
}
MemSet(map_entry_ptr(map, entry_size, idx), 0, entry_size);
}- In
Map.c:232:
void *dst_val = entry + value_offset;
MemSet(entry, 0, entry_size);
if (map->key_copy_init) {- In
Map.c:239:
map->key_copy_deinit(dst_key, map->allocator);
}
MemSet(entry, 0, entry_size);
return false;
}- In
Map.c:254:
map->key_copy_deinit(dst_key, map->allocator);
}
MemSet(entry, 0, entry_size);
return false;
}- In
Map.c:456:
AllocatorFree(map->allocator, map->states);
MemSet(map, 0, sizeof(*map));
}- In
Map.c:1146:
}
MemSet(dst_value, 0, value_size);
if (map->value_copy_init) {- In
Map.c:1179:
}
MemSet(map_entry_ptr(map, entry_size, idx), 0, entry_size);
map->states[idx] = MAP_SLOT_TOMBSTONE;
map->length -= 1;- In
Int.c:547:
}
MemSet(bytes, 0, bytes_to_copy);
for (u64 i = 0; i < bytes_to_copy; i++) {- In
Int.c:601:
}
MemSet(bytes, 0, bytes_to_copy);
for (u64 i = 0; i < bytes_to_copy; i++) {- In
Mutex.c:93:
# error "MutexDeinit: unsupported platform/architecture (no direct-syscall path)"
#endif
MemSet(m, 0, sizeof(Mutex));
}- In
PdbCache.c:101:
}
PdbCacheEntry entry;
MemSet(&entry, 0, sizeof(entry));
if (!StrTryInitFromCstr(&entry.module_path, module_path, ZstrLen(module_path), self->allocator)) {- In
PdbCache.c:130:
}
VecDeinit(&self->entries);
MemSet(self, 0, sizeof(*self));
}- In
Backtrace.c:201:
ULONG64 sym_buf[(sizeof(SYMBOL_INFO) + MAX_NAME + sizeof(ULONG64) - 1) / sizeof(ULONG64)];
SYMBOL_INFO *sym = (SYMBOL_INFO *)sym_buf;
MemSet(sym, 0, sizeof(*sym));
sym->SizeOfStruct = sizeof(SYMBOL_INFO);
sym->MaxNameLen = MAX_NAME;- In
Backtrace.c:206:
IMAGEHLP_LINE64 line;
MemSet(&line, 0, sizeof(line));
line.SizeOfStruct = sizeof(line);
ResolverCacheEntry entry;
MemSet(&entry, 0, sizeof(entry));
entry.path = path;
entry.load_base = load_base; LOG_FATAL("SymbolResolverInit: NULL argument");
}
MemSet(out, 0, sizeof(*out));
out->allocator = alloc;
out->cache = VecInitT(out->cache, alloc); if (!ProcMapsLoad(&out->maps, alloc)) {
VecDeinit(&out->cache);
MemSet(out, 0, sizeof(*out));
return false;
} VecDeinit(&self->cache);
ProcMapsDeinit(&self->maps);
MemSet(self, 0, sizeof(*self));
} if (!self || !out)
return false;
MemSet(out, 0, sizeof(*out));
u64 addr = (u64)runtime_addr;- In
Socket.c:367:
// the right field for each platform.
static void fill_socket_addr_from_sockaddr(SocketAddr *out, const struct sockaddr *sa, u32 len) {
MemSet(out, 0, sizeof(*out));
if (len > (u32)SOCKET_ADDR_MAX_SIZE) {
len = (u32)SOCKET_ADDR_MAX_SIZE;- In
Socket.c:384:
LOG_FATAL("SocketAddrParse: out is NULL");
}
MemSet(out, 0, sizeof(*out));
if (!spec) {- In
Socket.c:412:
if (parse_ipv4(host_data, v4)) {
struct sockaddr_in *sa = (struct sockaddr_in *)out->raw;
MemSet(out, 0, sizeof(*out));
sa->sin_family = AF_INET;
sa->sin_port = FROM_BIG_ENDIAN2(port);- In
Socket.c:423:
if (parse_ipv6(host_data, v6)) {
struct sockaddr_in6 *sa = (struct sockaddr_in6 *)out->raw;
MemSet(out, 0, sizeof(*out));
sa->sin6_family = AF_INET6;
sa->sin6_port = FROM_BIG_ENDIAN2(port);- In
Socket.c:443:
LOG_FATAL("SocketAddrParse: out is NULL");
}
MemSet(out, 0, sizeof(*out));
if (!spec) {- In
Socket.c:745:
LOG_FATAL("ListenerOpen: NULL argument");
}
MemSet(out, 0, sizeof(*out));
out->fd = SOCKET_FD_INVALID;- In
Socket.c:802:
LOG_FATAL("ListenerLocalAddr: NULL argument");
}
MemSet(out, 0, sizeof(*out));
u8 buf[SOCKET_ADDR_MAX_SIZE];
u32 len = (u32)sizeof(buf);- In
Socket.c:816:
LOG_FATAL("ListenerAccept: NULL argument");
}
MemSet(out_conn, 0, sizeof(*out_conn));
out_conn->fd = SOCKET_FD_INVALID;- In
Socket.c:839:
plat_close(self->fd);
}
MemSet(self, 0, sizeof(*self));
self->fd = SOCKET_FD_INVALID;
}- In
Socket.c:851:
LOG_FATAL("SocketConnect: NULL argument");
}
MemSet(out, 0, sizeof(*out));
out->fd = SOCKET_FD_INVALID;- In
Socket.c:899:
plat_close(self->fd);
}
MemSet(self, 0, sizeof(*self));
self->fd = SOCKET_FD_INVALID;
}- In
Proc.c:462:
#endif
}
MemSet(proc, 0, sizeof(*proc));
}- In
ProcMaps.c:173:
LOG_FATAL("ProcMapsLoad: NULL argument");
}
MemSet(out, 0, sizeof(*out));
out->raw = StrInit(alloc);
out->entries = VecInitT(out->entries, alloc);- In
ProcMaps.c:245:
StrDeinit(&self->raw);
VecDeinit(&self->entries);
MemSet(self, 0, sizeof(*self));
}- In
MachoCache.c:47:
}
MachoCacheEntry entry;
MemSet(&entry, 0, sizeof(entry));
if (!StrTryInitFromCstr(&entry.module_path, module_path, ZstrLen(module_path), self->allocator)) {- In
MachoCache.c:144:
}
VecDeinit(&self->entries);
MemSet(self, 0, sizeof(*self));
}- In
Dns.c:314:
return false;
}
MemSet(out, 0, sizeof(*out));
out->allocator = alloc;
out->hosts = VecInitT(out->hosts, alloc);- In
Http.c:25:
StrDeinit(&header->key);
StrDeinit(&header->value);
MemSet(header, 0, sizeof(*header));
}- In
Http.c:33:
StrDeinit(&header->key);
StrDeinit(&header->value);
MemSet(header, 0, sizeof(*header));
}- In
Http.c:193:
StrDeinit(&req->url);
VecDeinit(&req->headers);
MemSet(req, 0, sizeof(*req));
}- In
Http.c:503:
StrDeinit(&response->body);
VecDeinit(&response->headers);
MemSet(response, 0, sizeof(*response));
}- In
MachO.c:180:
}
MachoSegment seg;
MemSet(&seg, 0, sizeof(seg));
// Must-precondition for the next two moves: `cmdsize >=
// SEG64_CMD_SIZE_MIN` (checked above) reserves the 8-byte prefix
- In
MachO.c:221:
BufIter sec_it = IterCarve(cmd, SECT64_SIZE);
MachoSection sec;
MemSet(&sec, 0, sizeof(sec));
MemCopy(sec.section, IterDataAt(&sec_it, IterIndex(&sec_it)), 16);
sec.section[16] = '\0';- In
MachO.c:424:
}
Buf taken = *in;
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));- In
MachO.c:426:
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));
out->data = taken;
out->segments = VecInitT(out->segments, BufAllocator(&taken));- In
MachO.c:481:
VecDeinit(&self->sections);
VecDeinit(&self->symbols);
MemSet(self, 0, sizeof(*self));
}- In
Elf.c:438:
}
Buf taken = *in;
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));- In
Elf.c:440:
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));
out->data = taken;
out->sections = VecInitT(out->sections, BufAllocator(&taken));- In
Elf.c:497:
VecDeinit(&self->symbols);
VecDeinit(&self->dynamic_symbols);
MemSet(self, 0, sizeof(*self));
}- In
Dwarf.c:92:
// directory / file tables are walked separately by collect_cu_strings.
static bool decode_line_program_header(BufIter *cur, LineProgHeader *out) {
MemSet(out, 0, sizeof(*out));
u32 unit_length = 0;- In
Dwarf.c:288:
static void lnp_reset(LnpState *st, bool default_is_stmt) {
MemSet(st, 0, sizeof(*st));
st->file = 1;
st->line = 1;- In
Dwarf.c:303:
) {
DwarfLineEntry e;
MemSet(&e, 0, sizeof(e));
e.address = st->address;
e.line = st->line;- In
Dwarf.c:544:
LOG_FATAL("DwarfLinesBuildFromElf: NULL argument");
}
MemSet(out, 0, sizeof(*out));
out->allocator = alloc;
out->entries = VecInitT(out->entries, alloc);- In
Dwarf.c:663:
VecDeinit(&self->entries);
StrDeinit(&self->string_pool);
MemSet(self, 0, sizeof(*self));
}- In
DwarfInfo.c:523:
LOG_FATAL("DwarfFunctionsBuildFromSlices: NULL argument");
}
MemSet(out, 0, sizeof(*out));
out->allocator = alloc;
out->entries = VecInitT(out->entries, alloc);- In
DwarfInfo.c:635:
if (!ok) {
DwarfFunctionsDeinit(out);
MemSet(out, 0, sizeof(*out));
}- In
DwarfInfo.c:685:
if (StrAllocator(&self->string_pool))
StrDeinit(&self->string_pool);
MemSet(self, 0, sizeof(*self));
}- In
Pdb.c:702:
}
Buf taken = *in;
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));- In
Pdb.c:704:
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));
out->data = taken;
out->functions = VecInitT(out->functions, BufAllocator(&taken));- In
Pdb.c:774:
VecDeinit(&self->functions);
BufDeinit(&self->data);
MemSet(self, 0, sizeof(*self));
}
static bool parse_cie(BufIter *body, u64 cie_offset, DwarfCie *out) {
MemSet(out, 0, sizeof(*out));
out->offset = cie_offset; DwarfFde *out
) {
MemSet(out, 0, sizeof(*out));
out->offset = (u64)(body_start - section_data);
out->cie_offset = cie_offset; LOG_FATAL("DwarfCfiBuildFromElf: NULL argument");
}
MemSet(out, 0, sizeof(*out));
out->allocator = alloc;
out->cies = VecInitT(out->cies, alloc); VecDeinit(&self->cies);
VecDeinit(&self->fdes);
MemSet(self, 0, sizeof(*self));
}
static void cfi_vm_init(CfiVm *vm, const DwarfCie *cie, u64 fde_pc_begin, u8 ra_reg) {
MemSet(vm, 0, sizeof(*vm));
vm->row.return_address_register = ra_reg;
vm->location = fde_pc_begin;- In
Dns.c:180:
rec->target = StrInit(alloc);
rec->rdata = VecInitT(rec->rdata, alloc);
MemSet(rec->ipv4, 0, sizeof(rec->ipv4));
MemSet(rec->ipv6, 0, sizeof(rec->ipv6));- In
Dns.c:181:
rec->rdata = VecInitT(rec->rdata, alloc);
MemSet(rec->ipv4, 0, sizeof(rec->ipv4));
MemSet(rec->ipv6, 0, sizeof(rec->ipv6));
if (!decode_name(it, &rec->name)) {- In
Dns.c:274:
return false;
}
MemSet(out, 0, sizeof(*out));
out->answers = VecInitT(out->answers, alloc);
out->authority = VecInitT(out->authority, alloc);- In
Pe.c:511:
}
Buf taken = *in;
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));- In
Pe.c:513:
MemSet(in, 0, sizeof(*in));
MemSet(out, 0, sizeof(*out));
out->data = taken;
// Initialize the sections vec up-front so PeDeinit on a
- In
Pe.c:574:
BufDeinit(&self->data);
VecDeinit(&self->sections);
MemSet(self, 0, sizeof(*self));
}- In
Str.Remove.c:111:
// Create a buffer to store the removed characters
char buffer[6];
MemSet(buffer, 0, sizeof(buffer));
// Remove a range of characters
static bool test_alignment_honored(void) {
static u8 buf[1024];
MemSet(buf, 0, sizeof(buf));
BudgetAllocator bp = BudgetAllocatorInitAligned(buf, sizeof(buf), sizeof(int), 64);
Allocator *alloc = ALLOCATOR_OF(&bp);- In
PdbCache.c:116:
static void build_pe_blob(Zstr pdb_path) {
MemSet(pe_blob, 0, sizeof(pe_blob));
pe_blob[0] = 'M';- In
PdbCache.c:194:
static void build_pdb_blob(Zstr func_name, u32 func_rva) {
MemSet(pdb_blob, 0, sizeof(pdb_blob));
// Compute S_PUB32 record size based on function name length.
- In
MachO.c:49:
static void build_macho_blob(void) {
MemSet(blob, 0, sizeof(blob));
// --- Mach header (32 bytes) -------------------------------------------
- In
MachO.c:183:
u8 fat[64];
MemSet(fat, 0, sizeof(fat));
wr_u32(&fat[0], 0xCAFEBABEu);- In
Pdb.c:54:
static void build_msf_blob(void) {
MemSet(blob, 0, sizeof(blob));
// --- Superblock (page 0) -------------------------------------------------
- In
Pdb.c:122:
u8 garbage[256];
MemSet(garbage, 0xCC, sizeof(garbage));
Pdb pdb;- In
Pdb.c:176:
static void build_full_pdb_blob(void) {
MemSet(fblob, 0, sizeof(fblob));
// Directory size: 4 (count) + N_STREAMS*4 (sizes) + block_id_count*4
- In
MachoCache.c:79:
static u64 build_macho_image(u8 *out, const u8 uuid[16], const SymSpec *syms, u32 nsyms) {
MemSet(out, 0, BLOB_CAP);
// Compute placement.
- In
Pe.c:58:
static void build_pe_blob(void) {
MemSet(blob, 0, sizeof(blob));
// --- DOS header --------------------------------------------------------
- In
Pe.c:211:
u8 garbage[256];
MemSet(garbage, 0, sizeof(garbage));
garbage[0] = 'X';
garbage[1] = 'X';- In
Budget.h:203:
"BudgetAllocatorInit: buffer too small for bitmap + one padded slot" \
), \
MemSet( \
PTR_ALIGN_UP_POW2((buf_ptr), 8u), \
0, \
- In
Init.h:154:
} UNPL(_s) = {{0}, 0}; \
UNPL(_s).done == 0; \
MemSet(UNPL(_s).d, 0, sizeof(UNPL(_s).d)), UNPL(_s).done = 1) \
for (Vec(T) name = {.length = 0, \
.capacity = (ne), \
- In
Init.h:164:
*UNPL(_done) = &name; \
UNPL(_done); \
MemSet(&name, 0, sizeof(name)), UNPL(_done) = NULL)
///
- In
Init.h:234:
#define StrInitStack(name, ne) \
for (char UNPL(_d)[(ne) + 1] = {0}, *UNPL(_loop) = UNPL(_d); UNPL(_loop); \
MemSet(UNPL(_d), 0, sizeof(UNPL(_d))), UNPL(_loop) = NULL) \
for (Str name = {.length = 0, \
.capacity = (ne), \- In
Init.h:244:
*UNPL(_done) = &name; \
UNPL(_done); \
MemSet(&name, 0, sizeof(name)), UNPL(_done) = NULL)
///
- In
Insert.h:29:
if (!map->key_copy_init) {
MemSet(key_src, 0, key_size);
}- In
Insert.h:33:
if (!map->value_copy_init) {
MemSet(value_src, 0, value_size);
}- In
Insert.h:41:
static inline bool map_zero_value_source_on_success(GenericMap *map, void *value_src, size value_size, bool success) {
if (success && !map->value_copy_init) {
MemSet(value_src, 0, value_size);
}
Last updated on