Changeset: 6b33dc1cafd5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6b33dc1cafd5
Modified Files:
        gdk/gdk_posix.c
Branch: configurable_working_set
Log Message:

Add functionality to query virtual memory size.


diffs (24 lines):

diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -752,6 +752,20 @@ MT_getrss(void) // Obtain allocated phys
        return 0;
 }
 
+size_t
+MT_getvm(void) // Obtain allocated virtual memory
+{
+#ifdef WIN32
+       MEMORYSTATUSEX psvmemCounters;
+       psvmemCounters.dwLength = sizeof(MEMORYSTATUSEX); 
+       
+       GlobalMemoryStatusEx(&psvmemCounters);
+
+       return psvmemCounters.ullTotalVirtual - psvmemCounters.ullAvailVirtual;
+#endif
+       return 0;
+}
+
 /* Windows mmap keeps a global list of base addresses for complex
  * (remapped) memory maps the reason is that each remapped segment
  * needs to be unmapped separately in the end. */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to