Jetson nano installs swapfile to solve the problem of Cannot allocate memory

When executing some programs on jetson nano, since the memory of nano is only 4GB, the following error message may appear, for example: OSError: Cannot allocate memory problem. You can try the following method to solve this problem: This problem can be solved by installing swapfile.

$ git clone https://github.com/JetsonHacksNano/installSwapfile
$ cd installSwapfile
$ ./installSwapfile.sh 

If executed ./installSwapfile.shwithout adding any parameters, it will be hung in the /mnt directory by default, and the default size is 6G.

The operation to delete this swap space is as follows

$ su root
$ swapoff swapfile
$ rm /mnt/swapfile

Guess you like

Origin blog.csdn.net/weixin_39589455/article/details/132120989