Skip to content

Commit 3718e2e

Browse files
committed
fix some compile errors
1 parent b949295 commit 3718e2e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/gc-alloc-profiler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ JL_DLLEXPORT struct RawAllocResults jl_stop_alloc_profile() {
100100
}
101101

102102
return RawAllocResults{
103-
combined_allocs.data(),
104-
combined_allocs.size(),
105-
combined_frees.data(),
106-
combined_frees.size()
103+
g_combined_results.combined_allocs.data(),
104+
g_combined_results.combined_allocs.size(),
105+
g_combined_results.combined_frees.data(),
106+
g_combined_results.combined_frees.size()
107107
};
108108
}
109109

src/gc-alloc-profiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void _report_gc_finished(
3434
uint64_t pause, uint64_t freed, uint64_t allocd, int full, int recollect
3535
) JL_NOTSAFEPOINT;
3636
JL_DLLEXPORT void jl_start_alloc_profile(int skip_every);
37-
JL_DLLEXPORT struct RawAllocResults *jl_stop_alloc_profile(void);
37+
JL_DLLEXPORT struct RawAllocResults jl_stop_alloc_profile(void);
3838
JL_DLLEXPORT void jl_free_alloc_profile(void);
3939

4040
void _record_allocated_value(jl_value_t *val, size_t size) JL_NOTSAFEPOINT;

stdlib/AllocProfile/src/AllocProfile.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ function start(skip_every::Int=0)
3737
end
3838

3939
function stop()
40-
raw_results_ptr = ccall(:jl_stop_alloc_profile, Ptr{RawAllocResults}, ())
41-
raw_results = unsafe_load(raw_results_ptr)
40+
raw_results = ccall(:jl_stop_alloc_profile, RawAllocResults, ())
4241
decoded_results = decode(raw_results)
4342
return decoded_results
4443
end

0 commit comments

Comments
 (0)