AllocCheck.jl icon indicating copy to clipboard operation
AllocCheck.jl copied to clipboard

[Feature] Warning output instead of error

Open muendlein opened this issue 1 year ago • 2 comments

In the current example allocations will trigger an error. However this may not always be desired, thus I propose a configuration option for a warning instead.

julia> using AllocCheck

julia> @check_allocs multiply(x,y) = x * y
multiply (generic function with 1 method)

julia> multiply(1.5, 2.5) # call automatically checked for allocations
3.75

julia> multiply(rand(3,3), rand(3,3)) # result matrix requires an allocation
ERROR: @check_alloc function encountered 1 errors (1 allocations / 0 dynamic dispatches)

muendlein avatar Nov 18 '23 23:11 muendlein