• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# free
2
3
4## Command Function
5
6This command is used to display the memory usage in the system.
7
8
9## Syntax
10
11free [_-b | -k | -m | -g | -t_]
12
13
14## Parameters
15
16**Table 1** Parameter description
17
18| Parameter| Description |
19| -------- | -------- |
20| No parameter| Displays the memory usage in bytes.|
21| --help/-h | Displays the parameters supported by the **free** command.|
22| -b | Displays the memory usage in bytes.|
23| -k | Display the memory waterline in KiB.|
24| -m | Display the memory waterline in MiB.|
25| -g | Displays the memory usage in GiB.|
26| -t | Displays the memory usage in TiB.|
27
28
29## Usage Guidelines
30
31None.
32
33
34## Example
35
36Run **free**, **free -k**, and **free -m**, respectively.
37
38
39## Output
40
41
42```
43OHOS:/$ free
44                total        used        free      shared     buffers
45Mem:          2819652     2754468       65184           0           0
46-/+ buffers/cache:        2754468       65184
47Swap:               0           0           0
48OHOS:/$ free -k
49                total        used        free      shared     buffers
50Mem:             2753        2692          60           0           0
51-/+ buffers/cache:           2692          60
52Swap:               0           0           0
53OHOS:/$ free -m
54                total        used        free      shared     buffers
55Mem:                2           2           0           0           0
56-/+ buffers/cache:              2           0
57Swap:               0           0           0
58```
59
60**Table 2** Output description
61
62| Parameter| Description|
63| -------- | -------- |
64| total | Total size of the dynamic memory pool.|
65| used | Size of the used memory.|
66| free | Size of the unallocated memory.|
67| shared | Size of the shared memory.|
68| buffers | Size of the buffer.|
69
70