Write a simple C program, allocating 1Mbyte at a time in a for loop, and print out the value of loop index when malloc returns an error. Multiply index * 1Mbyte immediately after the error and that is how much you were able to alllocate and will tell you how much RAM the machine can see.
Win XP has a footprint of about 500MB. So assuming very little else is running, the index should be about 3500 (equating to 3500 megabytes, or 3.5 GB) before it errors on a 4GB machine. The value of index * 1M when malloc errors is the actual amount of RAM the machine can see.
It might be a little more complicated than this if you can alloc into paging file. I forget but I think you can control that the memory actually allocates into RAM. Otherwise make the paging file as small as possible and take it into consideration when doing the math.
nitro