A very simple and realistically non-worthwhile implementation is simple. Your malloc calls new with an byte array. Then your free, which you would also implement would use delete to delete the array. If you want a learning experience however then you should do the following in the specified order. 1. Learn what stack and list are and how to implement them. 2. Specifically learn how to implement them using sequential memory and not just pointers. 3. Learn how malloc is generally implemented. You will need substantial understanding of 1/2 to understand this. 4. Implement your own heap management. (Which you will understand after doing 1/2/3.)