diff --git a/modules/standard/MemDiagnostics.chpl b/modules/standard/MemDiagnostics.chpl index b0ddb2ae9636..8fe22ce8108a 100644 --- a/modules/standard/MemDiagnostics.chpl +++ b/modules/standard/MemDiagnostics.chpl @@ -264,15 +264,15 @@ iter allocations(minSize: integral = 0) { extern proc chpl_memtable_size(): c_int; extern proc chpl_memtable_entry(idx: c_int): c_ptr(void); extern proc chpl_memtable_next_entry(entry): c_ptr(void); - extern proc chpl_memtable_entry_addr(entry): uint; - extern proc chpl_memtable_entry_size(entry): uint; + extern proc chpl_memtable_entry_addr(entry): c_uintptr; + extern proc chpl_memtable_entry_size(entry): c_size_t; const hashSize = chpl_memtable_size(); for i in 0..= minSize then yield (addr,size); diff --git a/runtime/include/chplmemtrack.h b/runtime/include/chplmemtrack.h index 662eb9afc96c..0324a87e3570 100644 --- a/runtime/include/chplmemtrack.h +++ b/runtime/include/chplmemtrack.h @@ -59,8 +59,8 @@ void chpl_stopVerboseMemHere(void); int chpl_memtable_size(void); void* chpl_memtable_entry(int idx); void* chpl_memtable_next_entry(void* entry); -uint64_t chpl_memtable_entry_addr(void* entry); -uint64_t chpl_memtable_entry_size(void* entry); +uintptr_t chpl_memtable_entry_addr(void* entry); +size_t chpl_memtable_entry_size(void* entry); ///// These entry points are the essential memory tracking interface, called // at memory allocation and deallocation points. diff --git a/runtime/src/chplmemtrack.c b/runtime/src/chplmemtrack.c index 7dce5c20adf5..b22f9c05a8aa 100644 --- a/runtime/src/chplmemtrack.c +++ b/runtime/src/chplmemtrack.c @@ -804,12 +804,12 @@ void* chpl_memtable_next_entry(void* entry) { return (void*)(((memTableEntry*)entry)->nextInBucket); } -uint64_t chpl_memtable_entry_addr(void* entry) { - return (uint64_t)(((memTableEntry*)entry)->memAlloc); +uintptr_t chpl_memtable_entry_addr(void* entry) { + return (uintptr_t)(((memTableEntry*)entry)->memAlloc); } -uint64_t chpl_memtable_entry_size(void* entry) { +size_t chpl_memtable_entry_size(void* entry) { memTableEntry* _entry = (memTableEntry*)entry; - return (uint64_t)(_entry->size*_entry->number); + return (size_t)(_entry->size*_entry->number); }