Most likely you installed 32 bit Windows, which theoretically only supports 4GB of RAM max. Install a 64 bit version and if that doesn't work or you already had 64 bit, make sure you have legit Windows and if you do. Re-install Windows. And lastly, make sure your Mac is running the latest software to make sure boot camp isn't choking the chicken in the corner with an old version.
1. Press the Windows + R keys to open the Run dialog, type msconfig, and click/tap on OK.
2. If prompted by UAC, then click/tap on Yes.
3. Under the Boot tab in System Configuration, click/tap on the Advanced options button, and do step 4 or 5 below for what you would like to do. (see screenshot below)
Name: Step1.jpg Views: 41679 Size: 109.8 KB
4. To Have Windows Use All Installed Memory
NOTE: This is the default setting.
A) Uncheck the Maximum memory box, click/tap on OK, and go to step 6 below. (see screenshot below)
NOTE: If the box is not checked, then it does not matter what the selected number is since Windows will use all available RAM by default and ignore whatever value is in the box underneath.