I need to create an array as big as possible on my 32bit Linux computer. What is the biggest array size that my computer can handle? Is it 2^32 ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume it will be somewhere somewhere 2^31 and 2^32, not more, probably even less (part of address space will be taken by libraries and application code). One process cannot access more than 2^32 memory, and some OS mark half of address space for special purposes. Not sure if linux does this or not.
Size of pointer is 32bit, so you can’t get a linear chunk of memory larger than 2^32, no matter what you do. Anything that is not a “linear chunk of memory” can’t be called an array.