As the others said, Memory is a built-in that julia uses for a fixed size buffer.
Memory has an identity (i.e. like it were defined as mutable struct), but is immutable (all fields are const). The allocation underlying the Memory’s memory typically has a lifetime tied to the Memory’s lifetime.
This design is forced by the way GC works in julia: Our memory management requires a julia object with identity (mutable struct), allocated on the heap, with proper object header; but the actual memory needs to potentially have its own object header, managed by your allocator (e.g. glibc ptmalloc) that the julia runtime does not understand (you could use allocators via LD_PRELOAD that we never heard about).
This of course sucks: If you have mutable struct F mem::Memory{...} end then accessing f.mem[idx] needs to chase one too many pointers (first load the address of mem, then load the Memory object to obtain the pointer to f.mem[idx], and finally load the index).
The standard julia approach is to use “fat pointers”, aka MemoryRef. A MemoryRef contains both a pointer to the data, for quick access to the data, and a reference to the Memory instance, for memory management purposes. So it could look like struct MemoryRef{T} ptr::Ptr{T}; mem::Memory{...} end. [*]
Crucially, MemoryRef is immutable / has no identity. It is supposed to be inlined into your structs / arrays.
So, the TLDR is:
If you access data through Memory, then you are probably doing something wrong. For a measly 8 extra bytes (use fat-pointer MemoryRef instead of thin-pointer Memory) you could cut out an entire load from the dependency chain. If that load wasn’t L1, then this is huge (L2 latency already is bad).
Unfortunately, FixedSizedArrays does it wrong.
[*] Afaiu MemoryRef is, and needs to be, a built-in type instead of Base, because the designers decided against providing a full-powered “access data through a pointer” primitive, so unsafe_load doesn’t cut the cake (I think this sucks – please rip out all special-casing for memoryref, and instead expose a full-powered Base.Core.unsafe_load_for_powerusers_unstable_please_stay_away that explicitly passes stuff like alignment / atomicity / aliasing info, and can load object references without type-checking on pain of UB).