1
1

Gah; some non-final code got merged in by accident. Remove debugging

printf and put in the final test code for malloc.

This commit was SVN r20924.
Этот коммит содержится в:
Jeff Squyres 2009-04-01 18:20:23 +00:00
родитель bf17ce1d3f
Коммит 0f517c3d3f
2 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -752,8 +752,6 @@ static void opal_memory_ptmalloc2_malloc_init_hook(void)
}
if (want_rcache) {
const char str[] = "using ptmallo\n";
write(1, str, sizeof(str));
/* Initialize ptmalloc */
ptmalloc_init();

Просмотреть файл

@ -26,6 +26,7 @@
/* Include <link.h> for _DYNAMIC */
#include <link.h>
#include <malloc.h>
#include "opal/constants.h"
#include "opal/mca/memory/memory.h"
@ -63,6 +64,7 @@ bool opal_memory_ptmalloc2_memalign_invoked = false;
static int ptmalloc2_open(void)
{
void *p;
/* We always provide munmap support as part of libopen-pal.la. */
int val = OPAL_MEMORY_MUNMAP_SUPPORT;
@ -90,13 +92,19 @@ static int ptmalloc2_open(void)
opal_memory_ptmalloc2_memalign_invoked = false;
opal_memory_ptmalloc2_free_invoked = false;
void *p = malloc(1024 * 1024 * 4);
p = malloc(1024 * 1024 * 4);
if (NULL == p) {
return OPAL_ERR_OUT_OF_RESOURCE;
}
p = realloc(p, 1024 * 1024 * 4 + 32);
if (NULL == p) {
return OPAL_ERR_OUT_OF_RESOURCE;
}
realloc(p, 1024 * 1024 * 4 + 32);
free(p);
memalign(1, 1024 * 1024);
p = memalign(1, 1024 * 1024);
if (NULL == p) {
return OPAL_ERR_OUT_OF_RESOURCE;
}
free(p);
if (opal_memory_ptmalloc2_malloc_invoked &&