Systems, Networking &c

Louis louis at goessling.com
Sat Nov 24 21:10:55 UTC 2018


On Sat, Nov 24, 2018 at 2:24 PM Ioannis Nompelis <nompelis at nobelware.com> wrote:
> Louis, please point us to your malloc()/free()/calloc()/realloc() implementation.
> I'd like to take a look, if you do not mind.

I've put a copy at https://louis.members.acm.umn.edu/~louis/mm.c . Two caveats:
 - It's not going to work out-of-the-box as a malloc() replacement,
since it's meant to hook into the test suite for the class. I don't
think I'm supposed to distribute that, but if you happened to find a
copy at http://www-users.cselabs.umn.edu/classes/Fall-2018/csci2021-010/ha/4/ha4-handout.tar
it would work fine.
 - calloc() isn't implemented, but it could be done in terms of the
malloc() already implemented. An optimized version should probably use
mmap() to get something mapped to a zero page that will be backed by
real memory when written to, though.


More information about the Friends mailing list