i have 4GB ram but it shows that i can use onli 2.99GB

Solution
A older architecture 32 bit OS needs to set up fixed hardware buffers that will be carved out of your 4gb ram.
You might reduce this a bit if you are using integrated graphics and are reserving ram for vram.

If you want to use more than 4gb, you need a 64gb os and that will require a reinstall of the os and reinstalling apps.

If you can't do that and must live with a 32 bit os, buy a ssd.
A ssd will resolve hard page faults some 50x faster than a hard drive, mitigating any ram shortage problem a bit.
A older architecture 32 bit OS needs to set up fixed hardware buffers that will be carved out of your 4gb ram.
You might reduce this a bit if you are using integrated graphics and are reserving ram for vram.

If you want to use more than 4gb, you need a 64gb os and that will require a reinstall of the os and reinstalling apps.

If you can't do that and must live with a 32 bit os, buy a ssd.
A ssd will resolve hard page faults some 50x faster than a hard drive, mitigating any ram shortage problem a bit.
 
Solution