We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8d4bd1 commit 24d05b9Copy full SHA for 24d05b9
src/io.c
@@ -16,9 +16,19 @@
16
17
#include "io.h"
18
19
+
20
static uint8_t *data_memory_base;
-/* set memory size to 2^32 bytes */
21
-#define MEM_SIZE 0x100000000ULL
+/*
22
+ * set memory size to 2^32 - 1 bytes
23
+ *
24
+ * The memory size is set to 2^32 - 1 bytes in order
25
+ * to make rv32emu portable for both 32-bit and 64-bit platforms.
26
+ * As a result, rv32emu can access any segment of the memory in
27
+ * either platform. Furthermore, it is safe because most of the
28
+ * test cases' data memory usage will not exceed this memory size.
29
30
+ */
31
+#define MEM_SIZE 0xFFFFFFFFULL
32
33
memory_t *memory_new()
34
{
0 commit comments