Commit f860e676 authored by Philip Carns's avatar Philip Carns
Browse files

long->size_t for memory sizes

parent 4493b4ab
......@@ -82,7 +82,7 @@ struct darshan_core_module
{
void *rec_buf_start;
void *rec_buf_p;
long rec_mem_avail;
size_t rec_mem_avail;
darshan_module_funcs mod_funcs;
};
......@@ -107,9 +107,9 @@ struct darshan_core_runtime
/* darshan-core internal data structures */
struct darshan_core_module* mod_array[DARSHAN_MAX_MODS];
long mod_mem_used;
size_t mod_mem_used;
struct darshan_core_name_record_ref *name_hash;
long name_mem_used;
size_t name_mem_used;
double wtime_offset;
char *comp_buf;
#ifdef __DARSHAN_ENABLE_MMAP_LOGS
......
......@@ -155,7 +155,7 @@ void darshan_instrument_fs_data(
void darshan_core_register_module(
darshan_module_id mod_id,
darshan_module_funcs mod_funcs,
int *inout_mod_buf_size,
size_t *inout_mod_buf_size,
int *rank,
int *sys_mem_alignment);
......
......@@ -107,7 +107,7 @@ static void capture(struct darshan_bgq_record *rec, darshan_record_id rec_id)
void bgq_runtime_initialize()
{
int bgq_buf_size;
size_t bgq_buf_size;
darshan_record_id rec_id;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
......
......@@ -54,7 +54,7 @@ static int using_mpi = 0;
static int my_rank = 0;
static int nprocs = 1;
static int darshan_mem_alignment = 1;
static long darshan_mod_mem_quota = DARSHAN_MOD_MEM_MAX;
static size_t darshan_mod_mem_quota = DARSHAN_MOD_MEM_MAX;
static struct darshan_core_mnt_data mnt_data_array[DARSHAN_MAX_MNTS];
static int mnt_data_count = 0;
......@@ -741,7 +741,7 @@ static void *darshan_init_mmap_log(struct darshan_core_runtime* core, int jobid)
{
int ret;
int mmap_fd;
int mmap_size;
size_t mmap_size;
int sys_page_size;
char cuser[L_cuserid] = {0};
uint64_t hlevel;
......@@ -2147,13 +2147,13 @@ void darshan_shutdown_bench(int argc, char **argv)
void darshan_core_register_module(
darshan_module_id mod_id,
darshan_module_funcs mod_funcs,
int *inout_mod_buf_size,
size_t *inout_mod_buf_size,
int *rank,
int *sys_mem_alignment)
{
struct darshan_core_module* mod;
long mod_mem_req = *inout_mod_buf_size;
long mod_mem_avail;
size_t mod_mem_req = *inout_mod_buf_size;
size_t mod_mem_avail;
*inout_mod_buf_size = 0;
......
......@@ -166,8 +166,8 @@ static pthread_mutex_t dxt_runtime_mutex =
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
static int dxt_my_rank = -1;
static long dxt_total_mem = DXT_IO_TRACE_MEM_MAX;
static long dxt_mem_remaining = 0;
static size_t dxt_total_mem = DXT_IO_TRACE_MEM_MAX;
static size_t dxt_mem_remaining = 0;
#define MAX_DXT_TRIGGERS 20
static int num_dxt_triggers = 0;
......@@ -273,7 +273,7 @@ void dxt_posix_runtime_initialize()
* and passed back to darshan-core at shutdown time to allow DXT more control
* over realloc'ing module memory as needed.
*/
int dxt_psx_buf_size = 0;
size_t dxt_psx_buf_size = 0;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = NULL,
......@@ -338,7 +338,7 @@ void dxt_mpiio_runtime_initialize()
* and passed back to darshan-core at shutdown time to allow DXT more control
* over realloc'ing module memory as needed.
*/
int dxt_mpiio_buf_size = 0;
size_t dxt_mpiio_buf_size = 0;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = NULL,
......
......@@ -914,7 +914,7 @@ herr_t DARSHAN_DECL(H5Dclose)(hid_t dataset_id)
/* initialize internal HDF5 module data strucutres and register with darshan-core */
static void hdf5_file_runtime_initialize()
{
int hdf5_buf_size;
size_t hdf5_buf_size;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = &hdf5_file_mpi_redux,
......
......@@ -181,7 +181,7 @@ void darshan_instrument_lustre_file(const char* filepath, int fd)
static void lustre_runtime_initialize()
{
int lustre_buf_size;
size_t lustre_buf_size;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = &lustre_mpi_redux,
......
......@@ -307,7 +307,7 @@ mdhim_grm_t * DARSHAN_DECL(mdhimGet)(mdhim_t *md,
* darshan-core. */
static void mdhim_runtime_initialize()
{
int mdhim_buf_size;
size_t mdhim_buf_size;
darshan_module_funcs mod_funcs = {
.mod_redux_func = &mdhim_mpi_redux,
.mod_shutdown_func = &mdhim_shutdown
......
......@@ -1155,7 +1155,7 @@ DARSHAN_WRAPPER_MAP(PMPI_File_close, int, (MPI_File *fh), MPI_File_close)
/* initialize data structures and register with darshan-core component */
static void mpiio_runtime_initialize()
{
int mpiio_buf_size;
size_t mpiio_buf_size;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = &mpiio_mpi_redux,
......
......@@ -197,7 +197,7 @@ int DARSHAN_DECL(foo)(const char* name, int arg1)
/* Initialize internal NULL module data structures and register with darshan-core. */
static void null_runtime_initialize()
{
int null_buf_size;
size_t null_buf_size;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
/* NOTE: the redux function can be used to run collective operations prior to
......
......@@ -212,7 +212,7 @@ int DARSHAN_DECL(ncmpi_close)(int ncid)
/* initialize internal PNETCDF module data strucutres and register with darshan-core */
static void pnetcdf_runtime_initialize()
{
int pnetcdf_buf_size;
size_t pnetcdf_buf_size;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = &pnetcdf_mpi_redux,
......
......@@ -1864,7 +1864,7 @@ int DARSHAN_DECL(rename)(const char *oldpath, const char *newpath)
/* initialize internal POSIX module data structures and register with darshan-core */
static void posix_runtime_initialize()
{
int psx_buf_size;
size_t psx_buf_size;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = &posix_mpi_redux,
......
......@@ -999,7 +999,7 @@ int DARSHAN_DECL(fsetpos64)(FILE *stream, const fpos64_t *pos)
/* initialize internal STDIO module data structures and register with darshan-core */
static void stdio_runtime_initialize()
{
int stdio_buf_size;
size_t stdio_buf_size;
darshan_module_funcs mod_funcs = {
#ifdef HAVE_MPI
.mod_redux_func = &stdio_mpi_redux,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment