Changeset: d4c1a8c3cbcd for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d4c1a8c3cbcd Modified Files: gdk/gdk_system.c gdk/gdk_utils.c Branch: default Log Message:
Merge with Apr2019 branch. 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 @@ -870,16 +870,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) { @@ -915,6 +917,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 @@ -401,6 +401,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 */ @@ -434,6 +436,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 checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list