Skip to content

Instantly share code, notes, and snippets.

View rthomas's full-sized avatar
🏠
Working from home

Ryan Thomas rthomas

🏠
Working from home
  • Sydney, Australia
  • 03:04 (UTC +10:00)
View GitHub Profile
@rthomas
rthomas / main.rs
Created July 7, 2019 03:53
MyBox Impl
use std::alloc::{GlobalAlloc, Layout, System};
use std::ops::{Deref, Drop};
use std::marker::PhantomData;
use std::{mem, ptr};
#[derive(Debug)]
struct MyBox<T> {
ptr: *mut u8,
size: usize,
align: usize,
### Keybase proof
I hereby claim:
* I am rthomas on github.
* I am ryant (https://keybase.io/ryant) on keybase.
* I have a public key whose fingerprint is 27FF 6BEB 7EF2 7269 29AC 2D71 4555 CD92 DA9C 1378
To claim this, I am signing this object:
some more content
some more content
some more content
some more content
some more content
some more content
some more content
some more content