mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-16 19:58:46 +00:00
Fix incorrect handling of mmap error
This commit is contained in:
parent
f47d872df1
commit
eb11bd1add
1 changed files with 1 additions and 1 deletions
|
|
@ -1885,7 +1885,7 @@ extern void __init (void) {
|
||||||
from_space.begin = mmap (NULL, space_size, PROT_READ | PROT_WRITE,
|
from_space.begin = mmap (NULL, space_size, PROT_READ | PROT_WRITE,
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
|
MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, -1, 0);
|
||||||
to_space.begin = NULL;
|
to_space.begin = NULL;
|
||||||
if (to_space.begin == MAP_FAILED) {
|
if (from_space.begin == MAP_FAILED) {
|
||||||
perror ("EROOR: init_pool: mmap failed\n");
|
perror ("EROOR: init_pool: mmap failed\n");
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue