/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1999-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include "vmtest.h"
#include <pthread.h>
#ifndef N_THREAD
#endif
#if N_THREAD > 32
#endif
typedef struct _thread_s
} Tdata_t;
{
int k, p;
total = 0;
for(k = 0; k < N_ALLOC; ++k)
else
}
if(k > 10 )
{ p = random() % k;
{ if(random()%4 == 0 )
terror("Thread %d: failed to realloc(%d), total=%d",
else
}
}
else
}
}
}
if(k > 0 && k%(N_ALLOC/4) == 0)
}
return (void*)0;
}
tmain()
{
int i, rv;
void *status;
topts();
for(i = 0; i < N_THREAD; ++i)
terror("Failed to create thread %d", i);
tinfo("Thread %d was created", i);
}
for(i = 0; i < N_THREAD; ++i)
terror("Failed waiting for thread %d", i);
}
tinfo("#regions=%d #open-regions=%d #busy-regions=%d #probes=%d",
tinfo("n_busy=%d n_free=%d s_busy=%d s_free=%d n_seg=%d extent=%d",
texit(0);
}