aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-04-18 14:05:31 -0700
committerPaul Eggert2016-04-18 14:05:31 -0700
commit0808f2a1a331fbcb2e6ab57894502b0a34311869 (patch)
tree72386004f3d60a5fdbaf1176edeb38ba4083677e /src
parent3aa73b04e81ebc396892b14e5e9fa78a13ff85d1 (diff)
parentac00a92e3df7111c0eb2c6456ae7df5850bfd8fa (diff)
downloademacs-0808f2a1a331fbcb2e6ab57894502b0a34311869.tar.gz
emacs-0808f2a1a331fbcb2e6ab57894502b0a34311869.zip
Merge from origin/emacs-25
ac00a92 Make sh-electric-here-document-mode accessible in sh-mode-hoo... 3287f48 ; Add entry to MAINTAINERS b85981f * configure.ac (HAVE_MODULES): Exclude gnu-kfreebsd from prev... 0f33284 Make use of rectangle-preview custom variable. aa0d83a Make use of rectangle-preview face. 33bef6e Use 'grep-find-program' in check-declare.el a8560e5 Improve "C-h S" for cl-lib symbols 52e798b Fix minor issues with removing left or right fringes d6ffd64 Speed up redisplay in ansi-term mode 4ab671c Simplify 8-bit character handling by terminal for 'raw-text' f3653ec * configure.ac (HAVE_MODULES): Treat gnu like gnu-linux. (Bu... ab849b7 Fix w32 memory-management problem when extending buffer text
Diffstat (limited to 'src')
-rw-r--r--src/w32heap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/w32heap.c b/src/w32heap.c
index df2fe0a8fa3..6643b439a26 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -714,13 +714,12 @@ mmap_realloc (void **var, size_t nbytes)
714 /* If there is enough room in the current reserved area, then 714 /* If there is enough room in the current reserved area, then
715 commit more pages as needed. */ 715 commit more pages as needed. */
716 if (m2.State == MEM_RESERVE 716 if (m2.State == MEM_RESERVE
717 && m2.AllocationBase == memInfo.AllocationBase
717 && nbytes <= memInfo.RegionSize + m2.RegionSize) 718 && nbytes <= memInfo.RegionSize + m2.RegionSize)
718 { 719 {
719 void *p; 720 void *p;
720 721
721 p = VirtualAlloc (*var + memInfo.RegionSize, 722 p = VirtualAlloc (*var, nbytes, MEM_COMMIT, PAGE_READWRITE);
722 nbytes - memInfo.RegionSize,
723 MEM_COMMIT, PAGE_READWRITE);
724 if (!p /* && GetLastError() != ERROR_NOT_ENOUGH_MEMORY */) 723 if (!p /* && GetLastError() != ERROR_NOT_ENOUGH_MEMORY */)
725 { 724 {
726 DebPrint (("realloc enlarge: VirtualAlloc (%p + %I64x, %I64x) error %ld\n", 725 DebPrint (("realloc enlarge: VirtualAlloc (%p + %I64x, %I64x) error %ld\n",
@@ -728,7 +727,8 @@ mmap_realloc (void **var, size_t nbytes)
728 (uint64_t)(nbytes - memInfo.RegionSize), 727 (uint64_t)(nbytes - memInfo.RegionSize),
729 GetLastError ())); 728 GetLastError ()));
730 DebPrint (("next region: %p %p %I64x %x\n", m2.BaseAddress, 729 DebPrint (("next region: %p %p %I64x %x\n", m2.BaseAddress,
731 m2.AllocationBase, m2.RegionSize, m2.AllocationProtect)); 730 m2.AllocationBase, (uint64_t)m2.RegionSize,
731 m2.AllocationProtect));
732 } 732 }
733 else 733 else
734 return *var; 734 return *var;