The invention relates to a memory expansion method based on embedded
video monitoring equipment, which comprises the following steps of: setting an
original data maximum value MT and a compressed data maximum value ML through a zram function; a Linux standard tool is used for formatting a zram virtual block device, and the zram virtual block device is set as a swap cache; a swap function of the Linux is started; starting service
software, and performing memory configuration in the
software; when the
software starts to run, reading and receiving different types of data, and storing the data in the corresponding types of memory regions in a classified manner; when the physical memory is insufficient, the zram function starts a compression process; when
business software needs to use compressed and stored data, a
memory address is directly accessed, and an
operating system automatically recycles when the software ends running, all memories are released. Support is provided at the bottom layer of the
operating system, the upper layer business is basically non-inductive, and the
product function and stability are not influenced; the technology is mature and stable, development and
verification are fast, and benefits are obvious; and cross-platform and cross-product popularization can be realized, and the compatibility to service types is wide.