Skip to content
Snippets Groups Projects
Commit dde1db95 authored by wlott's avatar wlott
Browse files

Changed save to pad the core file out to CORE_PAGESIZE bytes, so that when

we mmap it back it, we won't get bus errors if the real page size is less
then the CORE_PAGESIZE.
parent 6516cdbf
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ static long write_bytes(FILE *file, char *addr, long bytes) ...@@ -18,6 +18,8 @@ static long write_bytes(FILE *file, char *addr, long bytes)
{ {
long count, here, data; long count, here, data;
bytes = (bytes+CORE_PAGESIZE-1)&~(CORE_PAGESIZE-1);
fflush(file); fflush(file);
here = ftell(file); here = ftell(file);
fseek(file, 0, 2); fseek(file, 0, 2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment