Re:On programming without malloc
by MichaelGG on Wednesday December 04, 2013 @02:37PM
(#6849515)
If that's legal, then I'm confused over the problem. Why not just start with a single address and increase by the amount requested each time? It pushes any difficulty off to the implementation of free, right?
[ Parent
| on HN ]
Re:On programming without malloc
by sliverstorm on Wednesday December 04, 2013 @02:55PM
(#6849676)
You can do that. Of course you have to revamp it when you need to add 'free', but you can do it.
It's just much less pernicious to do it that way, than my method, which means it's less fun :)
OK thanks for the info. I thought it was hard because he was in some mode that required him to setup pagetables and service faults and all that.
So it's just hard because writing a decent malloc/free is involved, algorithmically.