diff src/w32heap.c @ 18506:bcc706aedcea

Add pragma to force zero initialized data into .data segment.
author Geoff Voelker <voelker@cs.washington.edu>
date Tue, 01 Jul 1997 05:05:45 +0000
parents 36babc489b0c
children 16e69fbdbf0f
line wrap: on
line diff
--- a/src/w32heap.c	Tue Jul 01 05:05:06 1997 +0000
+++ b/src/w32heap.c	Tue Jul 01 05:05:45 1997 +0000
@@ -66,6 +66,13 @@
   syspage_mask = sysinfo_cache.dwPageSize - 1;
 }
 
+/* Emulate getpagesize.  */
+int
+getpagesize (void)
+{
+  return sysinfo_cache.dwPageSize;
+}
+
 /* Round ADDRESS up to be aligned with ALIGN.  */
 unsigned char *
 round_to_next (unsigned char *address, unsigned long align)
@@ -78,6 +85,10 @@
   return (unsigned char *) (tmp * align);
 }
 
+/* Force zero initialized variables to be placed in the .data segment;
+   MSVC 5.0 otherwise places them in .bss, which breaks the dumping code.  */
+#pragma data_seg(".data")
+
 /* Info for keeping track of our heap.  */
 unsigned char *data_region_base = NULL;
 unsigned char *data_region_end = NULL;