mkitti / ArrayAllocators.jl

Allocate arrays with malloc, calloc, or on NUMA nodes
MIT License
53 stars 1 forks source link

Evaluate ArrayAllocators.zeros(T, ...) when Base.zero(T) is defined #17

Open mkitti opened 1 year ago

mkitti commented 1 year ago

Currently, ArrayAllocators.zeros relies completely on Libc.calloc to zero memory. However, Base.zero may exist for a certain type and not consist of 0x00 bytes. The user may want to explicitly use fill!(A, zero(T)) in this case.