On 05/05/2017 14:51, Martin Husemann wrote: > On Fri, May 05, 2017 at 02:20:46PM +0100, Roy Marples wrote: >> Debugging memory use is always important. >> I'll move it to a separate function for clarity, but was hoping a better >> guard name than __VALGRIND__ could be used. >> >> Maybe __DEBUG_MEMORY__ or __FREE_RESOURCES__? > > The point was that we can not rely on the free function to be available in > a host tool build, right? > > So why not something simple like #ifndef HAVE_NBTOOL_CONFIG_H ? > Some tool builds seem to compile with -DNETBSD_TOOLS, that would be another > option.
That's for the hdestroy1 case yes which fixes the reported build problem. This discussion has moved onto a more general case of if we should clean up to assist memory debugging by cleaning up at exit and if so what should be name of a general guard be? Or just maybe it's per application and we should not care. Roy