# grid_create

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L306
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-grid_create/

```c
struct grid * grid_create(u_int sx, u_int sy, u_int hlimit)
```

## Parameters

- `sx` (`u_int`)
- `sy` (`u_int`)
- `hlimit` (`u_int`)

## Called by

- [`grid_reflow`](/en/tmux/latest/reference/c-function-grid_reflow/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L1443)
- [`screen_alternate_on`](/en/tmux/latest/reference/c-function-screen_alternate_on/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L688)
- [`screen_init`](/en/tmux/latest/reference/c-function-screen_init/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L78)

## Calls

- [`xcalloc`](/en/tmux/latest/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L324)
- [`xmalloc`](/en/tmux/latest/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L310)

## Referenced declarations

- [`grid.flags`](/en/tmux/latest/reference/c-struct-grid-flags/) (attribute)
- [`grid`](/en/tmux/latest/reference/c-struct-grid/) (struct)
- [`GRID_HISTORY`](/en/tmux/latest/reference/c-define-tmux-h-grid_history/) (constant)
- [`grid.hlimit`](/en/tmux/latest/reference/c-struct-grid-hlimit/) (attribute)
- [`grid.hscrolled`](/en/tmux/latest/reference/c-struct-grid-hscrolled/) (attribute)
- [`grid.hsize`](/en/tmux/latest/reference/c-struct-grid-hsize/) (attribute)
- [`grid.linedata`](/en/tmux/latest/reference/c-struct-grid-linedata/) (attribute)
- [`grid.sx`](/en/tmux/latest/reference/c-struct-grid-sx/) (attribute)
- [`grid.sy`](/en/tmux/latest/reference/c-struct-grid-sy/) (attribute)
