`about(Memory{Int})` fails
Closed this issue · 5 comments
jakobnissen commented
julia> about(Memory{Int})
Concrete (padded) DataTypeERROR: Type GenericMemory does not have a definite size.
[...]
julia> about(Memory{Int}(undef, 0))
0-element Memory{Int64} (mutable), 0B referencing 16B (<: DenseVector{Int64} <: AbstractVector{Int64} <: Any)
ERROR: Type GenericMemory does not have a definite size.
[...]
tecosaur commented
I've just pushed 1305239, which makes the type not error. I'm open to providing a nice specialised display though.
julia> about(Memory{Int})
Concrete (padded) DataType defined in Core,
Memory{Int64} <: DenseVector{Int64} <: AbstractVector{Int64} <: Any
Struct with 2 fields:
• length Int64
• ptr Ptr{Nothing}
fixing the memory value case will require some more thought.
jakobnissen commented
Related bug: about(Memory{Int}())
errors.
tecosaur commented
Indeed,
fixing the memory value case will require some more thought.
😉
Doing the basic fixes can result in this:
0-element Memory{Int64} (mutable) (<: DenseVector{Int64} <: AbstractVector{Int64} <: Any)
Memory footprint: 0B directly (referencing 16B in total)
but I do wonder if we could/should do something better.
tecosaur commented
tecosaur commented