You need to assign as much RAM to the guest operating system as you would want to have in a physical machine running that operating system. This works on the assumption that the host machine you're using has more than enough RAM for itself.
In general, I wouldn't want to run Windows XP (for anything but the most basic things) with less than 512MB of RAM. Thus, that's the minimum I give it when running it in a Virtual Machine.
If your host machine has only got, say, 512MB of RAM, then you're effectively limited to 256MB RAM for the guest, since most GUI Linuxes require ~256MB to run comfortably (please don't flame me!
).
Since your host machine has 2GB RAM, I would say you can comfortably assign 768MB to Windows XP for it to run smoothly without impacting on your host OS too much.
As for whether VirtualBox is better than VMWare at memory management, the virtualisation software itself takes up an insignificant amount of memory; it's the virtual machines which suck up all the RAM, and there's no way around that, that I'm aware of.