aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/dyn_load.c
diff options
context:
space:
mode:
authorRanjit Mathew <rmathew@gcc.gnu.org>2006-06-20 17:10:19 +0000
committerRanjit Mathew <rmathew@gcc.gnu.org>2006-06-20 17:10:19 +0000
commit971774e4385448741f89755baf8e20e145d9e964 (patch)
treef5f09bc8de3372861139eacf0b8c5d60b274c132 /boehm-gc/dyn_load.c
parent5a6ccafd7d4899ee7942a5f3be359a249c1273ae (diff)
downloadgcc-971774e4385448741f89755baf8e20e145d9e964.zip
gcc-971774e4385448741f89755baf8e20e145d9e964.tar.gz
gcc-971774e4385448741f89755baf8e20e145d9e964.tar.bz2
Backport Windows 9x/ME VirtualQuery() fix from GC 6.7.
* os_dep.c (GC_wnt): Define. (GC_init_win32): Set GC_wnt. * dyn_load.c (GC_register_dynamic_libraries): Consider MEM_PRIVATE sections also on Windows 9x/ME. From-SVN: r114818
Diffstat (limited to 'boehm-gc/dyn_load.c')
-rw-r--r--boehm-gc/dyn_load.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/boehm-gc/dyn_load.c b/boehm-gc/dyn_load.c
index 94e6609..3485474 100644
--- a/boehm-gc/dyn_load.c
+++ b/boehm-gc/dyn_load.c
@@ -860,6 +860,9 @@ void GC_register_dynamic_libraries()
}
# endif /* DEBUG_VIRTUALQUERY */
+ extern GC_bool GC_wnt; /* Is Windows NT derivative. */
+ /* Defined and set in os_dep.c. */
+
void GC_register_dynamic_libraries()
{
MEMORY_BASIC_INFORMATION buf;
@@ -901,7 +904,12 @@ void GC_register_dynamic_libraries()
* !is_frame_buffer(p, buf.RegionSize, buf.Type)
* instead of just checking for MEM_IMAGE.
* If something breaks, change it back. */
- && buf.Type == MEM_IMAGE) {
+ /* There is some evidence that we cannot always
+ * ignore MEM_PRIVATE sections under Windows ME
+ * and predecessors. Hence we now also check for
+ * that case. */
+ && (buf.Type == MEM_IMAGE ||
+ !GC_wnt && buf.Type == MEM_PRIVATE)) {
# ifdef DEBUG_VIRTUALQUERY
GC_dump_meminfo(&buf);
# endif