Skip to content

Commit

Permalink
Switch to uint64 to avoid overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Oct 29, 2023
1 parent 9077bbb commit 29982a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gc-alloc-profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ jl_raw_backtrace_t get_raw_backtrace() JL_NOTSAFEPOINT {

extern "C" { // Needed since these functions doesn't take any arguments.

extern int num_boxes_inputs = 0;
extern int num_boxes_returns = 0;
extern uint64_t num_boxes_inputs = 0;
extern uint64_t num_boxes_returns = 0;

JL_DLLEXPORT int jl_nhd_total_boxes() {
JL_DLLEXPORT uint64_t jl_nhd_total_boxes() {
return num_boxes_inputs + num_boxes_returns;
}

JL_DLLEXPORT int jl_nhd_boxes_inputs() {
JL_DLLEXPORT uint64_t jl_nhd_boxes_inputs() {
return num_boxes_inputs;
}
JL_DLLEXPORT int jl_nhd_boxes_returns() {
JL_DLLEXPORT uint64_t jl_nhd_boxes_returns() {
return num_boxes_returns;
}

Expand Down

0 comments on commit 29982a1

Please sign in to comment.