X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Jeffrey Powell" To: Subject: RE: Max array size Date: Thu, 6 Dec 2001 14:42:18 +0900 Message-Id: <000601c17e18$c6412ec0$1002a8c0@ygtynecs01097> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <9ump4d$186$1@news.iastate.edu> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Try this to see what your dpmi stats are. This is the output from my Win2K LapTop. It show that there should be enough memory. Array size = 640000 largest_available_free_block_in_bytes = 15728640 maximum_unlocked_page_allocation_in_pages = 3840 maximum_locked_page_allocation_in_pages = 2913 linear_address_space_size_in_pages = 524256 total_number_of_unlocked_pages = 2920 total_number_of_free_pages = 22902 total_number_of_physical_pages = 49020 free_linear_address_space_in_pages = 515387 size_of_paging_file_partition_in_pages = 117495 #include #include /* typedef struct { unsigned long largest_available_free_block_in_bytes; unsigned long maximum_unlocked_page_allocation_in_pages; unsigned long maximum_locked_page_allocation_in_pages; unsigned long linear_address_space_size_in_pages; unsigned long total_number_of_unlocked_pages; unsigned long total_number_of_free_pages; unsigned long total_number_of_physical_pages; unsigned long free_linear_address_space_in_pages; unsigned long size_of_paging_file_partition_in_pages; unsigned long reserved[3]; } __dpmi_free_mem_info; int __dpmi_get_free_memory_information(__dpmi_free_mem_info *_info); */ float MyArray[10000][16]; main(void) { __dpmi_free_mem_info *_info; printf("Array size = %lu\n",sizeof(MyArray)); MyArray[9999][15]=4.43; __dpmi_get_free_memory_information( _info ); printf("largest_available_free_block_in_bytes = %lu\n", _info->largest_available_free_block_in_bytes ); printf("maximum_unlocked_page_allocation_in_pages = %lu\n", _info->maximum_unlocked_page_allocation_in_pages ); printf("maximum_locked_page_allocation_in_pages = %lu\n", _info->maximum_locked_page_allocation_in_pages ); printf("linear_address_space_size_in_pages = %lu\n", _info->linear_address_space_size_in_pages ); printf("total_number_of_unlocked_pages = %lu\n", _info->total_number_of_unlocked_pages ); printf("total_number_of_free_pages = %lu\n", _info->total_number_of_free_pages ); printf("total_number_of_physical_pages = %lu\n", _info->total_number_of_physical_pages ); printf("free_linear_address_space_in_pages = %lu\n", _info->free_linear_address_space_in_pages ); printf("size_of_paging_file_partition_in_pages = %lu\n", _info->size_of_paging_file_partition_in_pages ); return 0; } Jeff Powell NEC CustomTechnica -----Original Message----- From: Tom Kent [mailto:tomkent AT iastate DOT edu] Sent: Thursday, December 06, 2001 12:38 PM To: djgpp AT delorie DOT com Subject: Max array size I was wondering if there was any maximum array size is. I've been trying to compile a program that has an array of floats with dimensions 10,000x16. It compiles fine, but then when i go to run it I get an error. However it compiles and runs fine under the gcc compiler on a unix machine I use. Because of this I was hypothesizing a potential limitation either with this compiler or with DOS. I'm running it in cmd.exe under windows XP on a dual 1.7GHz Xeon machine with 512MB RAM. Thanks in advance. Tom Kent