# xmalloc

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/xmalloc.c#L27
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-xmalloc/

```c
void * xmalloc(size_t size)
```

## Parameters

- `size` (`size_t`)

## Called by

- [`client_dispatch_exit_message`](/en/tmux/3.7c/reference/c-function-client-c-client_dispatch_exit_message/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/client.c#L619)
- [`client_main`](/en/tmux/3.7c/reference/c-function-client_main/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/client.c#L379)
- [`cmd_load_buffer_done`](/en/tmux/3.7c/reference/c-function-cmd-load-buffer-c-cmd_load_buffer_done/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-load-buffer.c#L71)
- [`cmd_run_shell_callback`](/en/tmux/3.7c/reference/c-function-cmd-run-shell-c-cmd_run_shell_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-run-shell.c#L265)
- [`cmd_set_buffer_exec`](/en/tmux/3.7c/reference/c-function-cmd-set-buffer-c-cmd_set_buffer_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-set-buffer.c#L115)
- [`cmd_show_environment_escape`](/en/tmux/3.7c/reference/c-function-cmd-show-environment-c-cmd_show_environment_escape/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-show-environment.c#L56)
- [`cmd_source_file_quote_for_glob`](/en/tmux/3.7c/reference/c-function-cmd-source-file-c-cmd_source_file_quote_for_glob/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-source-file.c#L147)
- [`cmd_template_replace`](/en/tmux/3.7c/reference/c-function-cmd_template_replace/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd.c#L851)
- [`cmd_wait_for_add`](/en/tmux/3.7c/reference/c-function-cmd-wait-for-c-cmd_wait_for_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-wait-for.c#L88)
- [`environ_clear`](/en/tmux/3.7c/reference/c-function-environ_clear/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L143)
- [`environ_set`](/en/tmux/3.7c/reference/c-function-environ_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L124)
- [`file_push`](/en/tmux/3.7c/reference/c-function-file_push/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L480)
- [`file_read`](/en/tmux/3.7c/reference/c-function-file_read/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L426)
- [`file_read_callback`](/en/tmux/3.7c/reference/c-function-file-c-file_read_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L706)
- [`file_write`](/en/tmux/3.7c/reference/c-function-file_write/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L347)
- [`format_add`](/en/tmux/3.7c/reference/c-function-format_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3925)
- [`format_add_cb`](/en/tmux/3.7c/reference/c-function-format_add_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3974)
- [`format_add_tv`](/en/tmux/3.7c/reference/c-function-format_add_tv/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3950)
- [`format_expand1`](/en/tmux/3.7c/reference/c-function-format-c-format_expand1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5666)
- [`format_job_complete`](/en/tmux/3.7c/reference/c-function-format-c-format_job_complete/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L351)
- [`format_job_get`](/en/tmux/3.7c/reference/c-function-format-c-format_job_get/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L390)
- [`format_quote_shell`](/en/tmux/3.7c/reference/c-function-format-c-format_quote_shell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3998)
- [`format_quote_style`](/en/tmux/3.7c/reference/c-function-format-c-format_quote_style/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4015)
- [`format_strip`](/en/tmux/3.7c/reference/c-function-format-c-format_strip/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4253)
- [`format_unescape`](/en/tmux/3.7c/reference/c-function-format-c-format_unescape/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4223)
- [`grid_create`](/en/tmux/3.7c/reference/c-function-grid_create/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L310)
- [`grid_string_cells`](/en/tmux/3.7c/reference/c-function-grid_string_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1102)
- [`input_osc_52_parse`](/en/tmux/3.7c/reference/c-function-input-c-input_osc_52_parse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L3258)
- [`input_reply_clipboard`](/en/tmux/3.7c/reference/c-function-input_reply_clipboard/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L3348)
- [`input_request_clipboard_reply`](/en/tmux/3.7c/reference/c-function-input-c-input_request_clipboard_reply/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L3509)
- [`key_bindings_get_table`](/en/tmux/3.7c/reference/c-function-key_bindings_get_table/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L115)
- [`layout_create_cell`](/en/tmux/3.7c/reference/c-function-layout_create_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L56)
- [`mode_tree_display_menu`](/en/tmux/3.7c/reference/c-function-mode-tree-c-mode_tree_display_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/mode-tree.c#L1148)
- [`paste_add`](/en/tmux/3.7c/reference/c-function-paste_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L178)
- [`paste_set`](/en/tmux/3.7c/reference/c-function-paste_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/paste.c#L297)
- [`screen_print`](/en/tmux/3.7c/reference/c-function-screen_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L846)
- [`screen_push_title`](/en/tmux/3.7c/reference/c-function-screen_push_title/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L291)
- [`server_client_check_exit`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_check_exit/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1939)
- [`server_client_exec`](/en/tmux/3.7c/reference/c-function-server_client_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L593)
- [`session_create`](/en/tmux/3.7c/reference/c-function-session_create/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L131)
- [`status_prompt_complete_list_menu`](/en/tmux/3.7c/reference/c-function-status-c-status_prompt_complete_list_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1976)
- [`status_prompt_complete_window_menu`](/en/tmux/3.7c/reference/c-function-status-c-status_prompt_complete_window_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L2035)
- [`status_prompt_escape`](/en/tmux/3.7c/reference/c-function-status-c-status_prompt_escape/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L592)
- [`status_prompt_load_history`](/en/tmux/3.7c/reference/c-function-status_prompt_load_history/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L135)
- [`status_push_screen`](/en/tmux/3.7c/reference/c-function-status-c-status_push_screen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L300)
- [`tty_keys_clipboard`](/en/tmux/3.7c/reference/c-function-tty-keys-c-tty_keys_clipboard/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L1402)
- [`tty_keys_next`](/en/tmux/3.7c/reference/c-function-tty_keys_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L1023)
- [`tty_set_selection`](/en/tmux/3.7c/reference/c-function-tty_set_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L2153)
- [`utf8_padcstr`](/en/tmux/3.7c/reference/c-function-utf8_padcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L930)
- [`utf8_rpadcstr`](/en/tmux/3.7c/reference/c-function-utf8_rpadcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L951)
- [`window_clock_init`](/en/tmux/3.7c/reference/c-function-window-clock-c-window_clock_init/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-clock.c#L178)
- [`window_copy_cellstring`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_cellstring/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L3831)
- [`window_copy_get_selection`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_get_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L5380)
- [`window_copy_search_jump`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_search_jump/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L4129)
- [`window_copy_search_lr_regex`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_search_lr_regex/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L3702)
- [`window_copy_search_marks`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_search_marks/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L4458)
- [`window_copy_search_rl_regex`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_search_rl_regex/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L3761)
- [`window_copy_view_init`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_view_init/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L528)
- [`window_pane_resize`](/en/tmux/3.7c/reference/c-function-window_pane_resize/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1204)
- [`window_pane_start_input`](/en/tmux/3.7c/reference/c-function-window_pane_start_input/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1831)

## Calls

- [`fatalx`](/en/tmux/3.7c/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/xmalloc.c#L32)

## Referenced by

- [`input_init`](/en/tmux/3.7c/reference/c-function-input_init/) (function)
- [`screen_write_collect_add`](/en/tmux/3.7c/reference/c-function-screen_write_collect_add/) (function)
