overdrivenpotato / rust-psp

Rust on PSP. Panic and allocation support. Access PSP system libraries.
Other
589 stars 31 forks source link

Simple VRAM Allocator #60

Closed MrAwesome closed 4 years ago

MrAwesome commented 4 years ago

Replicate the logic of the previous allocator, but in safe code using a struct.

Right now the alloc functions return a unique chunk object with the start point and the length. This would almost certainly look more complex in a more robust allocator, since the allocator would likely want to keep track of the allocated chunks for itself, or have the chunks store references to other chunks. Happy to make this look any way that makes sense, this is all uncharted territory to me but has been a lot of fun to hack on.

MrAwesome commented 4 years ago

Alright! Should be good to go.

overdrivenpotato commented 4 years ago

Thanks!