2 ms·
Writing a memory allocator is a great project. Too many programmers believe that malloc() does 'magic' or that what it is doing is simple. After writing your o
by joosters 13y ago
Writing a memory allocator is a great project. Too many programmers believe that malloc() does 'magic' or that what it is doing is simple.
After writing your own allocator, you'll never view malloc() as a cheap and simple operation again!
- awj 13y agoIndeed. The proper thing to do is: write your own malloc, learn an enormous amount from implementing malloc, never ever under any circumstances allow your malloc implementation to enter into production use. Hopefully the act of writing your own malloc implementation will be enough to convince you not to use it in anger, but it's probably best to be clear on the subject.