Merge pull request #22 from Soarex16/1.10

Fix incorrect handling of mmap error
This commit is contained in:
Dmitry Boulytchev 2023-01-10 00:09:53 +03:00 committed by GitHub
commit b738da8c34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}