[mvapich-discuss] mvapich2 and malloc

Sayantan Sur surs at cse.ohio-state.edu
Thu Jul 12 14:03:25 EDT 2007


Oops, I accidentally sent the patch for MVAPICH, instead of MVAPICH2. 
Since you're using MVAPICH2, this is the patch you should try.

Thanks,
Sayantan.

Sayantan Sur wrote:
> Hi Bryan,
>
> Thanks for such a detailed bug report! No, this is not a known issue. 
> I was able to reproduce the problem and it is solved with this patch 
> (attached). Can you let us know if this patch works for you?
>
> Thanks,
> Sayantan.
>


-- 
http://www.cse.ohio-state.edu/~surs

-------------- next part --------------
Index: dreg.c
===================================================================
--- dreg.c      (revision 1380)
+++ dreg.c      (working copy)
@@ -953,9 +953,9 @@
 }
 
 #ifndef DISABLE_PTMALLOC
-void find_and_free_dregs_inside(void *buf, int len)
+void find_and_free_dregs_inside(void *buf, size_t len)
 {
-    int i;
+    unsigned long i;
     unsigned long pagenum_low, pagenum_high;
     unsigned long  npages, begin, end;
     unsigned long user_low_a, user_high_a;
Index: mem_hooks.c
===================================================================
--- mem_hooks.c (revision 1380)
+++ mem_hooks.c (working copy)
@@ -96,7 +96,7 @@
 
 #ifndef DISABLE_MUNMAP_HOOK
 
-int mvapich2_munmap(void *buf, int len)
+int mvapich2_munmap(void *buf, size_t len)
 {
     if(!mvapich2_minfo.munmap) {
         set_real_munmap_ptr();
Index: dreg.h
===================================================================
--- dreg.h      (revision 1380)
+++ dreg.h      (working copy)
@@ -240,7 +240,7 @@
 dreg_entry *dreg_new_entry(void *buf, int len);
 
 #ifndef DISABLE_PTMALLOC
-void find_and_free_dregs_inside(void *buf, int len);
+void find_and_free_dregs_inside(void *buf, size_t len);
 #endif
 
 #ifdef CKPT
Index: mem_hooks.h
===================================================================
--- mem_hooks.h (revision 1380)
+++ mem_hooks.h (working copy)
@@ -42,7 +42,7 @@
 void mvapich2_mfin(void);
 
 #ifndef DISABLE_MUNMAP_HOOK
-int mvapich2_munmap(void *buf, int len);
+int mvapich2_munmap(void *buf, size_t len);
 #endif
 
 #ifndef DISABLE_TRAP_SBRK



More information about the mvapich-discuss mailing list