By default CentOS 5 32-bit Kernel will only use first 3 GB RAM even if you allocate 4 GB RAM. You will a Kernel with PAE (Physical Address Extension) support. You can install it using the following command:
yum install kernel-PAE
You will have to reboot your VPS after installing PAE support Kernel. You may need to change grub.conf to boot your VPS automatically from new Kernel.