I have the following stats when I do a htop:
I don't understand although it says that I have 7450MB memory the graph goes towards the end. Why is this?
It's filled up with cache. Still available to programs if they need it, but currently allocated by the kernel.
Take this graph of one of my VMs:
'Apps' is only a little bit, but a large part of the rest of the memory is filled with buffers and cache. It helps to put as much disk data in memory to speed it up.
However, the way the Linux kernel does it (simple FIFO buffer based on access time) has been criticised, because all your cached data is gone after doing an md5sum on a large file, for instance.
You can drop all the cache manually by doing:
sync; echo 3 > /proc/sys/vm/drop_caches
Then your htop or free -m
output shows a lot of 'free' memory.