Skip to content

Commit

Permalink
Merge pull request #22 from Soarex16/1.10
Browse files Browse the repository at this point in the history
Fix incorrect handling of mmap error
  • Loading branch information
dboulytchev authored Jan 9, 2023
2 parents f47d872 + eb11bd1 commit b738da8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,7 @@ extern void __init (void) {
from_space.begin = mmap (NULL, space_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
to_space.begin = NULL;
if (to_space.begin == MAP_FAILED) {
if (from_space.begin == MAP_FAILED) {
perror ("EROOR: init_pool: mmap failed\n");
exit (1);
}
Expand Down

0 comments on commit b738da8

Please sign in to comment.