Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
21532667
Commit
21532667
authored
Sep 27, 1997
by
Karl Heuer
Browse files
(relinquish): When returning memory to the system,
watch out for the original data segment boundary.
parent
2c1e5f9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
src/ralloc.c
src/ralloc.c
+12
-1
No files found.
src/ralloc.c
View file @
21532667
...
...
@@ -363,7 +363,18 @@ relinquish ()
}
if
((
*
real_morecore
)
(
-
excess
)
==
0
)
abort
();
{
/* If the system didn't want that much memory back, adjust
the end of the last heap to reflect that. This can occur
if break_value is still within the original data segment. */
last_heap
->
end
+=
excess
;
/* Make sure that the result of the adjustment is accurate.
It should be, for the else clause above; the other case,
which returns the entire last heap to the system, seems
unlikely to trigger this mode of failure. */
if
(
last_heap
->
end
!=
(
*
real_morecore
)
(
0
))
abort
();
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment