|
|
|
|
|
by slashvar2701
2803 days ago
|
|
While I strongly support the idea that no one should write a generic allocator in production, writing it as an exercise is a very good idea. The article looks at lot like the tutorial I wrote a long time ago ... (Every now and then, I see my old PDF in post about implementing allocators, which is disturbing since I wrote it in a hurry as a quick support for a lecture and I found it very poorly written ... ) I think it's interesting to note that using sbrk(2) is a bit deprecated, it's way easier to implement malloc(3) using mmap(2) ... There's also better ways to handle pointers arithmetic and list management. Someday I'll put only cleaner version only ... Someday ... |
|