adding arena (p6)

This commit is contained in:
Allen Webster
2021-07-20 22:17:03 -07:00
parent 2953d97c53
commit a54f8b893f
6 changed files with 29 additions and 26 deletions
+3 -3
View File
@@ -571,16 +571,16 @@ int main(void)
}
{
MD_Map map = MD_MapMake();
MD_Map map = MD_MapMake(arena);
for (MD_u64 i = 0; i < MD_ArrayCount(keys); i += 1){
MD_MapInsert(&map, keys[i], (void *)i);
MD_MapInsert(arena, &map, keys[i], (void *)i);
}
for (MD_u64 i = 0; i < MD_ArrayCount(keys); i += 1){
MD_MapSlot *slot = MD_MapLookup(&map, keys[i]);
TestResult(slot && slot->val == (void *)i);
}
for (MD_u64 i = 0; i < MD_ArrayCount(keys); i += 1){
MD_MapOverwrite(&map, keys[i], (void *)(i + 10));
MD_MapOverwrite(arena, &map, keys[i], (void *)(i + 10));
}
for (MD_u64 i = 0; i < MD_ArrayCount(keys); i += 1){
MD_MapSlot *slot = MD_MapLookup(&map, keys[i]);