The allocation limit is defined by two factors: instruction-set architecture
of the processor used (should be supported by the adequate Windows version), and available physical memory. On top of it, the allocation is limited by the current level of memory utilization. Yes, there is a 2GB limit, but only for 32-bit versions. As you can see, 32-bit flat address space limit the number of addressable bytes by 4Gb, but, according to Windows documentation, only 2Gb or 3Gb (tunable) is reserved by OS for applications.
Apparently, this 4Gb-based limitations are not applicable to 64-bit instruction-set architectures, so, in practice, these days, addressable space is limited by the physically available RAM and OS.
For further detail, please see: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx
See also: http://en.wikipedia.org/wiki/Instruction_set
I just noticed that you did not tag your OS as Windows or anything else. I just assumed it was about Windows, because you mentioned the familiar 2Gb barrier.
Please see my comment to the question; always tag your platform. For other OS, please see appropriate documentation.
I also forgot to mention that, next to the instruction-set architecture of the CPU, the memory is apparently limited by the design of the motherboard. In some cases (especially in the past models), even if the number of slots was enough for some maximum amount of memory, not all combinations of memory modules works at full capacity or even recognized. Before you buy memory, always consult the motherboard documentation.