We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7fd15b commit 0ca9deeCopy full SHA for 0ca9dee
src/riscv.c
@@ -239,10 +239,6 @@ static void map_file(char **ram_loc, const char *name)
239
if (*ram_loc == MAP_FAILED)
240
goto cleanup;
241
#else
242
- /* calloc and load data to a memory region */
243
- *ram_loc = calloc(st.st_size, sizeof(uint8_t));
244
- if (!*ram_loc)
245
- goto cleanup;
246
if (read(fd, *ram_loc, st.st_size) != st.st_size) {
247
free(*ram_loc);
248
0 commit comments