- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My application allocates several large arrays. Unfortunately, the allocating and accessing code always uses ints. This has limited the size of array that can be allocated.
I was wondering if there are any compiler options available that would simply force an int to be 64 bit. I would take a small memory hit overall, but it would help me avoid many weeks of work.
Thanks!
I was wondering if there are any compiler options available that would simply force an int to be 64 bit. I would take a small memory hit overall, but it would help me avoid many weeks of work.
Thanks!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I must admit that I do not understand what you want.
What forces you to use int as array index? You can use __int64 or simply increment a pointer if the array is accessed sequentially. As for allocation, you can always use VirtualAlloc() for large allocations instead of new[] operator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you mean kind errors - http://www.viva64.com/help/V108.html
You can easily find and correct all wrong types, using tool Viva64 (http://www.viva64.com/download.php)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Original post seems to ask for something analogous to -i8 option of ifort. I have run into customers who insist they cannot support platforms where sizeof(int) != sizeof(size_t) even though C has not supported this assertion since size_t was implemented 20 years ago.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page