Can I upgrade the Raspbery Pi's RAM from 512 MB to 1 GB or 2 GB? I can't build a cpp-netlib in GCC 4.6 or 4.8 because the build consumes all 512 MB. I realize I can cross-compile, but I'm wondering specifically if I can install a new RAM chip. Does the Raspberry Pi have enough address lines? Will the Rapsberry Pi need to be configured differently or will it auto-detect the hypothetically larger RAM?
The raspberry pi does not support replacement of the current RAM chip. The current RAM chip is soldered directly to the top of CPU as a BGA package, that makes it very difficult to remove and/or replace even if you could find the compatible bigger memory chip.
There was an interesting discussion on it here.
No. The RAM is a Package on Package (POP) on top of the SoC, so it is not removable or swappable, and 512 MB is the maximum RAM the Raspberry Pi can support since there are no manufacturers making larger-capacity compatible devices. [Source]
So even if you find a way to unsolder the current chip, you can't find a bigger one that fits.
You could however move the swap partition to a (fast) usb stick, to get a bit of a performance boost when using large amounts of memory.