base/tests/mimalloc_output_handlers.cc
/**
 * @brief Default mi-malloc output handler.  Function is called to output any
 * information from mimalloc, like verbose or warning messages.
 * @param msg Message to output.
 * @param arg Argument that was passed at registration to hold extra state.
 * @return void.
 */
@brief Default mi-malloc output handler.  Function is called to output any
information from mimalloc, like verbose or warning messages.
@param msg Message to output.
@param arg Argument that was passed at registration to hold extra state.
@return void.
@brief Default mi - malloc output handler . Function is called to output any information from mimalloc like verbose or warning messages . @param msg Message to output . @param arg Argument that was passed at registration to hold extra state . @return void .
void DefaultMiMallocOutput(const char* msg,
                           [[maybe_unused]] void* arg) noexcept {
  const bool is_warning_or_error{!!std::strstr(msg, "warning:") ||
                                 !!std::strstr(msg, "error:")};
  if (is_warning_or_error) {
    G3LOG(WARNING) << "Mi-malloc warning: " << msg;
  } else {
    G3LOG(INFO) << "Mi-malloc output: " << msg;
  }
}
void DefaultMiMallocOutput ( const char * msg , [[ maybe_unused ]] void * arg ) noexcept { const bool is_warning_or_error { ! ! std :: strstr ( msg , " " ) || ! ! std :: strstr ( msg , " " ) } ; if ( is_warning_or_error ) { G3LOG ( WARNING ) << " " << msg ; } else { G3LOG ( INFO ) << " " << msg ; } }
@brief Default mi-malloc output handler.
@brief Default mi - malloc output handler .