Currently, we don't make any attempt to detect whether an allocation is eagerly zeroed during GC sweeping by the runtime/secret support code. When that allocation is reused later, it will get zeroed again, even though we could infer that it already contains zeros.
I don't think the overhead of storing individual objects zeroed state is worth it and the double zeroing shouldn't be too expensive because secret allocations are meant to be fairly small. Maybe we could implement a separate class of spans for secret allocations, but that's a lot of complexity for not a lot of gain.
Currently, we don't make any attempt to detect whether an allocation is eagerly zeroed during GC sweeping by the
runtime/secretsupport code. When that allocation is reused later, it will get zeroed again, even though we could infer that it already contains zeros.I don't think the overhead of storing individual objects zeroed state is worth it and the double zeroing shouldn't be too expensive because secret allocations are meant to be fairly small. Maybe we could implement a separate class of spans for secret allocations, but that's a lot of complexity for not a lot of gain.