memorymap.c: initialize mappings array with zeros

This commit is contained in:
Pavel I. Kryukov 2018-10-06 14:14:36 +03:00 committed by GitHub
parent 58c6af5f98
commit 11e50e5585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,7 @@ static void rotate_right(struct memory_map *, struct memory_map_node *);
// Creates a new memory map.
void create_memory_map(struct memory_map *map) {
memset(map->mappings, 0, sizeof(struct memory_map_node) * 19);
map->next_map_index = 1;
map->nil = map->mappings;
map->root = map->nil;