The max is 2^32 bytes (4 GiB) for a 32-bit computer.
I believe the physical max for most 64-bit CPUs is 2^48 bytes (256 TiB). Check your motherboard to see its supported memory configuration, too.
Keep in mind that no consumer version of 32-bit Windows can address more than around 3G of physical RAM depending on what hardware you use and how much virtual memory space it takes up. 4GiB is the virtual limit for 32-bit, not the physical. A 512MiB graphics card may take some (512MiB?) of the 4G address space because it needs the addresses, too.
Here are the details for 64-bit Windows (basically it can use tons of gigs):
# 8 tebibytes (2^43 bytes) of user mode virtual address space per process. A 64-bit program can use all of this, subject of course to backing store limits on the system. This is a 4096-fold increase over the default 2 gibibyte user-mode virtual address space offered by 32-bit Windows.
# 8 tebibytes (2^43 bytes) of kernel mode virtual address space for the operating system. Again, this is a 4096-fold increase over 32-bit Windows versions. The increased space is primarily of benefit to the file system cache and kernel mode "heaps" (non-paged pool and paged pool).
# Support for up to 128 GiB (Windows XP) or 1 TiB (Windows Server 2003) of RAM.