@cas
1. premise
- uuid v4 will never generate the same uuid
- since theyre unique now every pointer is a uuid
- its statistically impossible that a uuid can collide, therefore it can never happen in the lifetime of the universe
- this means we can make a new uuid for every malloc
- ultra fast sleek design, innovative solution
fn malloc(size: usize) -> Uuid {
uuid::new_v4()
}
fn free(mut ptr: Uuid) {
ptr = uuid::from(0);
}
@angelthorns hmm but that doesn't return a valid (in the progeam context which to be fair could be bare metal) pointer...
@cas Here you go! {c7f01a6d-5219-4f4d-b3c9-ae11a9610822}
@cas a more advanced, *cough* I mean "lean" implementation could just use system("mktemp")