Changeset: c2bbd6fcbf5c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2bbd6fcbf5c
Modified Files:
gdk/gdk_system.c
gdk/gdk_utils.c
Branch: Apr2019
Log Message:
Don't check for cgroup limitations on Windows.
diffs (57 lines):
diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -880,16 +880,18 @@ MT_check_nr_cores(void)
if (ncpus <= 0)
ncpus = 1;
#if SIZEOF_SIZE_T == SIZEOF_INT
- /* On 32-bits systems with large amounts of cpus/cores, we quickly
- * run out of space due to the amount of threads in use. Since it
- * is questionable whether many cores on a 32-bits system are going
- * to beneficial due to this, we simply limit the auto-detected
- * cores to 16 on 32-bits systems. The user can always override
- * this via gdk_nr_threads. */
+ /* On 32-bits systems with large numbers of cpus/cores, we
+ * quickly run out of space due to the number of threads in
+ * use. Since it is questionable whether many cores on a
+ * 32-bits system are going to be beneficial due to this, we
+ * simply limit the auto-detected cores to 16 on 32-bits
+ * systems. The user can always override this via
+ * gdk_nr_threads. */
if (ncpus > 16)
ncpus = 16;
#endif
+#ifndef WIN32
/* get the number of allocated cpus from the cgroup settings */
FILE *f = fopen("/sys/fs/cgroup/cpuset/cpuset.cpus", "r");
if (f != NULL) {
@@ -925,6 +927,7 @@ MT_check_nr_cores(void)
return ncpu;
}
}
+#endif
return ncpus;
}
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -395,6 +395,8 @@ MT_init(void)
#else
# error "don't know how to get the amount of physical memory for your OS"
#endif
+
+#ifndef WIN32
/* limit values to whatever cgroups gives us */
FILE *f;
/* limit of memory usage */
@@ -428,6 +430,8 @@ MT_init(void)
}
fclose(f);
}
+#endif
+
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) &&
defined(RLIMIT_AS)
struct rlimit l;
/* address space (virtual memory) limit */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list