Graphviz contains its own allocator library, vmalloc (lib/vmalloc). This seems to provide a malloc-like interface with some extra tracing and profiling support. I’m trying to follow the motivation for this library. I would have thought Graphviz is not performance sensitive enough to need its own allocation strategies and could just call
malloc directly. If there is a need to debug allocation itself, I would think you could do this by
malloc and friends or using
Maybe a level of indirection like this is necessary for Windows compatibility? The comments indicate some of this code originated ~1994, so maybe there simply wasn’t sufficient malloc standardization in the mid-90s? I browsed the commit log for this directory but did not manage to learn much. Can anyone else provide a bit of context here?