openharmony 鸿蒙 kernel-small-debug-shell-cmd-free

2022-08-09 浏览 (738)

free

Command Function

This command is used to display the memory usage in the system.

Syntax

free [-b|-k|-m|-g|-t]

Parameters

Table 1 Parameter description

ParameterDescription
No parameterDisplays the memory usage in bytes.
--help/-hDisplays the parameters supported by the free command.
-bDisplays the memory usage in bytes.
-kDisplay the memory waterline in KiB.
-mDisplay the memory waterline in MiB.
-gDisplays the memory usage in GiB.
-tDisplays the memory usage in TiB.

Usage Guidelines

None.

Example

Run free, free -k, and free -m, respectively.

Output

OHOS:/$ free
                total        used        free      shared     buffers
Mem:          2819652     2754468       65184           0           0
-/+ buffers/cache:        2754468       65184
Swap:               0           0           0
OHOS:/$ free -k
                total        used        free      shared     buffers
Mem:             2753        2692          60           0           0
-/+ buffers/cache:           2692          60
Swap:               0           0           0
OHOS:/$ free -m
                total        used        free      shared     buffers
Mem:                2           2           0           0           0
-/+ buffers/cache:              2           0
Swap:               0           0           0

Table 2 Output description

ParameterDescription
totalTotal size of the dynamic memory pool.
usedSize of the used memory.
freeSize of the unallocated memory.
sharedSize of the shared memory.
buffersSize of the buffer.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Kernel

harmony 鸿蒙Kernel Coding Specification

harmony 鸿蒙Standard Libraries

harmony 鸿蒙Interrupt Management

harmony 鸿蒙Event

harmony 鸿蒙Mutex

harmony 鸿蒙Queue

harmony 鸿蒙Semaphore

harmony 鸿蒙Doubly Linked List

harmony 鸿蒙Memory Management

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/3520302090d6466c98a2986ea73a0fc6