It might be a good idea to implement some sort of buffer manager in the future, to keep memory usage and fragmentation low. Just something to keep in mind.