Skip to content

Commit

Permalink
Merge pull request #182 from ChinYikMing/master
Browse files Browse the repository at this point in the history
Call appropriate release function
  • Loading branch information
jserv authored Aug 1, 2023
2 parents 687491c + d21591f commit 3baf584
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ memory_t *memory_new()

void memory_delete(memory_t *mem)
{
#if defined(USE_MMAP)
munmap(mem->mem_base, MEM_SIZE);
#else
free(mem->mem_base);
#endif
}

void memory_read(memory_t *mem, uint8_t *dst, uint32_t addr, uint32_t size)
Expand Down

0 comments on commit 3baf584

Please sign in to comment.