mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 20:24:21 +00:00
Log jemalloc version if in use.
This commit is contained in:
13
proc.c
13
proc.c
@@ -31,6 +31,10 @@
|
|||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_JEMALLOC
|
||||||
|
#include <jemalloc/jemalloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
struct tmuxproc {
|
struct tmuxproc {
|
||||||
@@ -181,6 +185,10 @@ proc_start(const char *name)
|
|||||||
{
|
{
|
||||||
struct tmuxproc *tp;
|
struct tmuxproc *tp;
|
||||||
struct utsname u;
|
struct utsname u;
|
||||||
|
#ifdef HAVE_JEMALLOC
|
||||||
|
const char *version;
|
||||||
|
size_t size = sizeof version;
|
||||||
|
#endif
|
||||||
|
|
||||||
log_open(name);
|
log_open(name);
|
||||||
setproctitle("%s (%s)", name, socket_path);
|
setproctitle("%s (%s)", name, socket_path);
|
||||||
@@ -195,6 +203,11 @@ proc_start(const char *name)
|
|||||||
#ifdef HAVE_UTF8PROC
|
#ifdef HAVE_UTF8PROC
|
||||||
log_debug("using utf8proc %s", utf8proc_version());
|
log_debug("using utf8proc %s", utf8proc_version());
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_JEMALLOC
|
||||||
|
if (mallctl("version", &version, &size, NULL, 0) != 0)
|
||||||
|
version = "(unknown version)";
|
||||||
|
log_debug("using jemalloc %s", version);
|
||||||
|
#endif
|
||||||
#ifdef NCURSES_VERSION
|
#ifdef NCURSES_VERSION
|
||||||
log_debug("using ncurses %s %06u", NCURSES_VERSION, NCURSES_VERSION_PATCH);
|
log_debug("using ncurses %s %06u", NCURSES_VERSION, NCURSES_VERSION_PATCH);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user