Skip to content

Commit f5e8dfd

Browse files
committed
moved instatiation of simulated memory from stack to global variable
1 parent 5130803 commit f5e8dfd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

c/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ typedef struct {
1515
uint8_t patch_slot[PATCH_SLOT_SIZE*1024];
1616
} memory_t;
1717

18+
// instantiate memory
19+
memory_t flash;
20+
1821
// addresses of the slots
1922
uint64_t START_PATCH_SLOT;
2023
uint64_t START_OLD_SLOT;
@@ -32,9 +35,6 @@ int main(int argc, char *argv[]){
3235
return 1;
3336
}
3437

35-
// instantiate memory
36-
memory_t flash;
37-
3838
// Initialize buffer sizes
3939
READ_BUFFER_SIZE = atoi(argv[4]);
4040
PATCH_BUFFER_SIZE = atoi(argv[5]);

0 commit comments

Comments
 (0)