The situation is this: I run a matlab program that uses a huge amounts of memory and swap memory, however, while it's running, I killed it(ctrl+z), but I find that it did not return the memory it takes. When I want to run the program again, matlab tells me 'out of memory'.
So I need the free the wasteful memory myself, I tried
sudo sysctl -w vm.drop_caches=3
But it doesn't work, the memory is still in use. This is what my top shows
top - 19:39:52 up 1:25, 3 users, load average: 0.27, 0.51, 0.73
Tasks: 227 total, 1 running, 223 sleeping, 2 stopped, 1 zombie
Cpu(s): 4.2%us, 0.9%sy, 0.0%ni, 94.8%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8045612k total, 6878404k used, 1167208k free, 25096k buffers
Swap: 15622140k total, 7239720k used, 8382420k free, 406024k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2542 txh18 20 0 457m 18m 10m S 10 0.2 6:24.66 gnome-system-mo
1403 root 20 0 201m 14m 4356 S 6 0.2 3:33.67 Xorg
2218 txh18 20 0 1272m 39m 10m S 2 0.5 1:51.68 compiz
8176 txh18 20 0 884m 62m 22m S 2 0.8 0:08.86 chromium-browse
7858 txh18 20 0 2858m 143m 53m S 1 1.8 0:25.54 chromium-browse
2547 txh18 20 0 503m 9.9m 4796 S 1 0.1 0:04.91 gnome-terminal
8298 txh18 20 0 483m 49m 24m S 1 0.6 0:03.39 chromium-browse
15 root RT 0 0 0 0 S 0 0.0 0:00.01 watchdog/2
2188 txh18 20 0 19556 2608 612 S 0 0.0 0:06.88 dbus-daemon
2289 txh18 20 0 316m 9176 6168 S 0 0.1 0:01.26 gtk-window-deco
2299 txh18 20 0 511m 15m 5544 S 0 0.2 0:16.61 unity-panel-ser
Hope someone can help me free my memory, thanks.
I'm sorry, the top list is not complete, when I shift+M in the top, I found that the MATLAB process is still there.