This post explains how to use memory hotplug to increase/decrease the amount of memory.
To see (online/offline) state of memory section, read ‘state’ file.
# grep line /sys/devices/system/memory/*/state /sys/devices/system/memory/memory0/state:online /sys/devices/system/memory/memory1/state:online /sys/devices/system/memory/memory2/state:online /sys/devices/system/memory/memory3/state:online /sys/devices/system/memory/memory4/state:online
To set a memory[x] to online/offline:
# echo online > /sys/devices/system/memory/memory[number]/state # echo offline > /sys/devices/system/memory/memory[number]/state
To verify the current state:
# free -m
More details could be found at : /usr/share/doc/kernel-doc-*/Documentation/memory-hotplug.txt