From: Florent Kermarrec Date: Wed, 25 Mar 2015 18:00:07 +0000 (+0100) Subject: sofware/memtest: use MAIN_RAM_SIZE from mem.h X-Git-Tag: 24jan2021_ls180~2437 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1fc24e66dcf1aa6dc96cde7b40c6c52b2421157a;p=litex.git sofware/memtest: use MAIN_RAM_SIZE from mem.h --- diff --git a/software/memtest/main.c b/software/memtest/main.c index 8ac178bc..a52ddbac 100644 --- a/software/memtest/main.c +++ b/software/memtest/main.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,7 @@ static void membw_service(void) static void memtest_service(void) { - static unsigned int test_buffer[64*1024*1024/4] __attribute__((aligned(16))); + static unsigned int test_buffer[(MAIN_RAM_SIZE/2)/4] __attribute__((aligned(16))); static unsigned char reading; static unsigned int err, total_err; #ifdef DEBUG