/* this automatically, and rely largely on user input. */
/* We expect that any mapping with type MEM_MAPPED (which */
/* apparently excludes library data sections) can be safely */
- /* ignored. But we're too chicken to do that in this */
- /* version. */
+ /* ignored. But we're too completely remove this code in */
+ /* this version. */
/* Based on a very limited sample, it appears that: */
/* - Frame buffer mappings appear as mappings of large */
/* length, usually a bit less than a power of two. */
}
# 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;
* !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