On Thu, Dec 08, 2005 at 09:59:46AM -0500, Brian Barrett wrote:
> On Dec 8, 2005, at 9:27 AM, Gleb Natapov wrote:
>
> > On Wed, Dec 07, 2005 at 10:40:51AM -0500, Brian Barrett wrote:
> >> Hopefully this made some sense. If not, on to the next round of e-
> >> mails :).
> >>
> > This made allot of sense. What is compiled by default now is
> > malloc_hooks
> > I'll compile ptmalloc and play with it and may be then will be the
> > next
> > round :)
>
> Further clarification... All this work was done on the trunk and
> probably won't come over to the v1.0 branch in the short term
> (definitely not for v1.0.1). The v1.0 series still defaults to using
> the malloc_hooks and all that.
>
I work with trunk here, and I have a problem to run openib with
ptmalloc2. It seems ptmalloc2 doesn't define posix_memalign() function
and openib uses it, so libc version is called and this doens't work.
Included patch solves the problem but perhaps there is other solution.
Index: opal/mca/memory/ptmalloc2/malloc.c
===================================================================
--- opal/mca/memory/ptmalloc2/malloc.c (revision 8398)
+++ opal/mca/memory/ptmalloc2/malloc.c (working copy)
@@ -5431,12 +5431,11 @@
*/
-#ifdef _LIBC
-# include <sys/param.h>
+#include <sys/param.h>
/* We need a wrapper function for one of the additions of POSIX. */
int
-__posix_memalign (void **memptr, size_t alignment, size_t size)
+posix_memalign (void **memptr, size_t alignment, size_t size)
{
void *mem;
__malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
@@ -5464,6 +5463,7 @@
return ENOMEM;
}
+#ifdef _LIBC
weak_alias (__posix_memalign, posix_memalign)
strong_alias (__libc_calloc, __calloc) weak_alias (__libc_calloc, calloc)
--
Gleb.