Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cache information interface and implementation for AMD and Intel on Linux
[palacios.git] / linux_module / memcheck.c
index 2ab86b2..b687850 100644 (file)
@@ -1,3 +1,8 @@
+/* 
+   Palacios memory allocation-checking framework
+   (c) Peter Dinda, 2013
+ */
+
 #include <linux/kernel.h>
 #include <linux/kthread.h>
 #include <linux/spinlock.h>
@@ -172,6 +177,9 @@ void palacios_memcheck_deinit()
       printmem("ALLOCATED MEMORY AT DEINIT",m);
     } 
   }
+
+  palacios_spinlock_deinit(&lock);
+
   INFO("MEMCHECK: DEINITED\n");
 
   // Note that this function could garbage collect at this 
@@ -257,7 +265,8 @@ void palacios_memcheck_free(void *addr,unsigned long size, palacios_memcheck_mem
   memcheck_state_t *m=find_mem_entry(addr,0,type); // don't care about the size now
   
   if (!m){
-    DEBUG("MEMCHECK: FREEING UNTRACKED %s MEMORY AT 0x%p FOR %lu BYTES\n",TYPE_TO_STR(type),addr,size);
+    DEBUG("MEMCHECK: FREEING UNTRACKED %s MEMORY AT 0x%p FOR %lu BYTES - stack trace follows\n",TYPE_TO_STR(type),addr,size);
+    dump_stack();
     return;
   }