lör 2010-05-29 klockan 18:58 +1200 skrev Amos Jeffries: > +CXXFLAGS="$CXXFLAGS -nostdlib" > +AC_SEARCH_LIBS([malloc],[tcmalloc jemalloc dlmalloc ptmalloc3 > nedmalloc ptmalloc2 malloc]) > +CXXFLAGS=$saved_flags
I am not very comfortable with this. -nostdlib is a GCC option, and also there is no guarantee that linking a malloc library will at all work with that option. It only works by accident when using shared libraries due to the shared libraries having embedded dependencies and brings in libc as well. Also as mentioned before the mallopt and mallinfo calls need to be appropriately shielded to disable them if the selected malloc do not implement them. Unfortunately that has to be handcoded as autoconf can not test if the function comes from a selected lib or libc. Thankfully both are relatively harmless if called but mallinfo data given in cachemgr will be odd if not implemented by the actually used malloc. Regards Henrik
