1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00

(mmap_realloc): When shrinking, make sure number of

pages is rounded towards zero.
This commit is contained in:
Ken Raeburn 2002-07-21 13:59:00 +00:00
parent 90dc758dc0
commit bb63c5c9b8
2 changed files with 6 additions and 1 deletions

View file

@ -4670,7 +4670,7 @@ mmap_realloc (var, nbytes)
{
/* Shrinking by at least a page. Let's give some
memory back to the system. */
mmap_enlarge (r, - (room - nbytes) / mmap_page_size);
mmap_enlarge (r, - ((room - nbytes) / mmap_page_size));
result = *var;
r->nbytes_specified = nbytes;
}