1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gc: extend optimized mode to maps (#10426)

This commit is contained in:
Uwe Krüger
2021-06-13 05:26:43 +02:00
committed by GitHub
parent 2ac39d9112
commit 5ee1ded3fb
4 changed files with 177 additions and 6 deletions

View File

@ -338,7 +338,7 @@ fn new_map(key_bytes int, value_bytes int, hash_fn MapHashFn, key_eq_fn MapEqFn,
cached_hashbits: max_cached_hashbits
shift: init_log_capicity
key_values: new_dense_array(key_bytes, value_bytes)
metas: unsafe { &u32(vcalloc(metasize)) }
metas: unsafe { &u32(vcalloc_noscan(metasize)) }
extra_metas: extra_metas_inc
len: 0
has_string_keys: has_string_keys