aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2020-01-03 18:27:35 +0200
committerEli Zaretskii2020-01-03 18:27:35 +0200
commit2b6d702e5d2d572640c6bcd43f54138bacbe7ac8 (patch)
tree0583cef4073643f6a9d1529d9df09089ae93e93c /src
parentfa7148fd5ac7c10c32a1cdcf57ade55bc3be8718 (diff)
downloademacs-2b6d702e5d2d572640c6bcd43f54138bacbe7ac8.tar.gz
emacs-2b6d702e5d2d572640c6bcd43f54138bacbe7ac8.zip
Fix the MS-Windows build broken by "Let the OS clear large new objects"
* src/w32heap.c (sys_calloc): New function, implements calloc in terms of our private implementations of malloc. * nt/inc/ms-w32.h (calloc): Redirect to sys_calloc.
Diffstat (limited to 'src')
-rw-r--r--src/w32heap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/w32heap.c b/src/w32heap.c
index 3a6c7804675..ececc73c026 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -597,6 +597,16 @@ free_after_dump_9x (void *ptr)
597 } 597 }
598} 598}
599 599
600void *
601sys_calloc (size_t number, size_t size)
602{
603 size_t nbytes = number * size;
604 void *ptr = (*the_malloc_fn) (nbytes);
605 if (ptr)
606 memset (ptr, 0, nbytes);
607 return ptr;
608}
609
600#if defined HAVE_UNEXEC && defined ENABLE_CHECKING 610#if defined HAVE_UNEXEC && defined ENABLE_CHECKING
601void 611void
602report_temacs_memory_usage (void) 612report_temacs_memory_usage (void)