3-15-99 First check-in of umalloc_local files was bad

This commit is contained in:
elliott 1999-03-15 17:07:32 +00:00
parent 1d791d45e0
commit fc89707f90
3 changed files with 17 additions and 30 deletions

View File

@ -7,33 +7,26 @@
* $Revision$
*********************************************************************EHEADER*/
#ifndef UMALLOC_LOCAL_HEADER
#define UMALLOC_LOCAL_HEADER
#ifdef HYPRE_USE_UMALLOC
#include <pthread.h>
#include <umalloc.h>
#include "umalloc_local.h"
#define MAX_THREAD_COUNT 10
#define INITIAL_HEAP_SIZE 500000
#define GET_MISS_COUNTS
struct upc_struct
void *_uget_fn(Heap_t usrheap, size_t *length, int *clean)
{
Heap_t myheap;
};
void *_uinitial_block[MAX_THREAD_COUNT];
struct upc_struct _uparam[MAX_THREAD_COUNT];
int _uheapReleasesCount=0;
int _uheapGetsCount=0;
pthread_mutex_t _ucountmutex=PTHREAD_MUTEX_INITIALIZER;
void *_uget_fn(Heap_t usrheap, size_t *length, int *clean);
void _urelease_fn(Heap_t usrheap, void *p, size_t size);
void *p;
*length = ((*length) / INITIAL_HEAP_SIZE) * INITIAL_HEAP_SIZE
+ INITIAL_HEAP_SIZE;
*clean = _BLOCK_CLEAN;
p = (void *) calloc(*length, 1);
return p;
}
void _urelease_fn(Heap_t usrheap, void *p, size_t size)
{
free (p);
return;
}
#endif
#endif

View File

@ -11,7 +11,6 @@
#define UMALLOC_LOCAL_HEADER
#ifdef HYPRE_USE_UMALLOC
#include <pthread.h>
#include <umalloc.h>
#define MAX_THREAD_COUNT 10
@ -29,8 +28,6 @@ struct upc_struct _uparam[MAX_THREAD_COUNT];
int _uheapReleasesCount=0;
int _uheapGetsCount=0;
pthread_mutex_t _ucountmutex=PTHREAD_MUTEX_INITIALIZER;
void *_uget_fn(Heap_t usrheap, size_t *length, int *clean);
void _urelease_fn(Heap_t usrheap, void *p, size_t size);

View File

@ -681,7 +681,6 @@ int hypre_PrintTiming P((char *heading , MPI_Comm comm ));
#define UMALLOC_LOCAL_HEADER
#ifdef HYPRE_USE_UMALLOC
#include <pthread.h>
#include <umalloc.h>
#define MAX_THREAD_COUNT 10
@ -699,8 +698,6 @@ struct upc_struct _uparam[MAX_THREAD_COUNT];
int _uheapReleasesCount=0;
int _uheapGetsCount=0;
pthread_mutex_t _ucountmutex=PTHREAD_MUTEX_INITIALIZER;
void *_uget_fn(Heap_t usrheap, size_t *length, int *clean);
void _urelease_fn(Heap_t usrheap, void *p, size_t size);