Changeset: 1b591c23d5fe for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b591c23d5fe
Modified Files:
        gdk/gdk_posix.c
        gdk/gdk_system.c
Branch: default
Log Message:

If there is no way to find the RSS value, throw a compilation error.


diffs (49 lines):

diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -343,11 +343,12 @@ MT_getrss(void)
                        return ((size_t) atol(r)) * MT_pagesize();
                }
        }
+       return 0;
+#else
+#error Could not find a way to calculate the RSS on the target platform
 #endif
-       return 0;
 }
 
-
 void *
 MT_mmap(const char *path, int mode, size_t len)
 {
@@ -745,11 +746,9 @@ MT_init_posix(void)
 size_t
 MT_getrss(void)
 {
-#ifdef _WIN64
        PROCESS_MEMORY_COUNTERS ctr;
        if (GetProcessMemoryInfo(GetCurrentProcess(), &ctr, sizeof(ctr)))
                return ctr.WorkingSetSize;
-#endif
        return 0;
 }
 
@@ -903,7 +902,6 @@ MT_path_absolute(const char *pathname)
                (pathname[0] == '\\' && pathname[1] == '\\'));
 }
 
-
 #ifndef HAVE_GETTIMEOFDAY
 static int nodays[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
 
diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -809,7 +809,6 @@ MT_join_thread(MT_Id t)
        return 0;
 }
 
-
 int
 MT_kill_thread(MT_Id t)
 {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to