sos-os / kernel

The Stupid Operating System
Apache License 2.0
264 stars 16 forks source link

Can the return type of an allocation be changed to Option<Unique<u8>>? #63

Closed hawkw closed 7 years ago

hawkw commented 7 years ago

Rather than representing a pointer to an allocation as *mut u8, can we represent it as an Option<Unique<u8>>?

Using Unique might allow the compiler to do more reasoning about an allocation result...

hawkw commented 7 years ago

I think #65 may supersede this.

hawkw commented 7 years ago

Turns out it can (at least sort of), see #72