Shouldn't pureMalloc be @system instead of @trusted?

ag0aep6g anonymous at example.com
Fri Mar 16 21:58:13 UTC 2018


On 03/16/2018 10:22 PM, Nordlöw wrote:
> Shouldn't `pureMalloc` at
> 
> https://dlang.org/library/core/memory/pure_malloc.html
> 
> be @system instead of @trusted?

You can only access the uninitialized memory with @system features: 
casting the pointer or slicing it. So it's safe, because you can't do 
anything unsafe with it in @safe code.


More information about the Digitalmars-d mailing list