I program with the g++ compiler on a linux workstation. I am testing a very simple program that has only a 1000x1000x1000 array of boolean variables. I thought each boolean variable occupied only one bit. So the program would require appromixately 10^9 bits ~= 119 megabytes of RAM. However, the system monitor tells me that the program requires about 976 megabytes of RAM.
Why?
Thanks.