M
M
I wrote a c++ program which utilizes a bitset<80> map. If I do a sizeof
bitset<80> it says 12 bytes and there's no limit to the number of entries I
can add to the map. What I mean is the number of entries is limited to
memory because if I create 10 bit combinations of 80 that can max out at
1,646,492,110,120 combinations nCk(80,10). Multiply that by 12 and it's off
the charts
So how many combinations can I create given the size of the memory of the
pc. For example I would like to calculate how much memory there is and
report to the user 'give your memory size I can only create X number of
combinations'. but I'm not sure how to do that.
Also it started as a c++ program then stl got in the picture and finally MFC
came into the picture with a logging class I added so maybe those take away
from the pool I can play in.
I was reading about how windows programs get 2 meg to play with and are
allocated more when they need it but when I run this program for a huge
number of combinations it just gets slower and slower and eventually I kill
it but the pc isn't quite right until it gets rebooted. I think someone how
windows loses is mind when dealing with that many combinations and doesn't
know what to do until it s rebooted.
Any thoughts?
thanks alot !!!
bitset<80> it says 12 bytes and there's no limit to the number of entries I
can add to the map. What I mean is the number of entries is limited to
memory because if I create 10 bit combinations of 80 that can max out at
1,646,492,110,120 combinations nCk(80,10). Multiply that by 12 and it's off
the charts
So how many combinations can I create given the size of the memory of the
pc. For example I would like to calculate how much memory there is and
report to the user 'give your memory size I can only create X number of
combinations'. but I'm not sure how to do that.
Also it started as a c++ program then stl got in the picture and finally MFC
came into the picture with a logging class I added so maybe those take away
from the pool I can play in.
I was reading about how windows programs get 2 meg to play with and are
allocated more when they need it but when I run this program for a huge
number of combinations it just gets slower and slower and eventually I kill
it but the pc isn't quite right until it gets rebooted. I think someone how
windows loses is mind when dealing with that many combinations and doesn't
know what to do until it s rebooted.
Any thoughts?
thanks alot !!!