IT Community - Software Programming, Web Development and Technical Support

How can I allocate arrays or structures bigger than 64K?

This is a discussion on How can I allocate arrays or structures bigger than 64K? within the C and C++ Programming forums, part of the Software Development category; How can I allocate arrays or structures bigger than 64K?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C and C++ Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-12-2007, 03:38 AM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 803
vadivelanvaidyanathan is on a distinguished road
Default How can I allocate arrays or structures bigger than 64K?

How can I allocate arrays or structures bigger than 64K?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-17-2007, 03:33 AM
Sabari Sabari is offline
D-Web Genius
 
Join Date: Jul 2007
Posts: 1,008
Sabari is on a distinguished road
Talking Re: How can I allocate arrays or structures bigger than 64K?

A reasonable computer ought to give you transparent access to all available memory. If you're not so lucky, you'll either have to rethink your program's use of memory, or use various system-specific techniques.

64K is (still) a pretty big chunk of memory. No matter how much memory your computer has available, it's asking a lot to be able to allocate huge amounts of it contiguously. (The C Standard does not guarantee that single objects can be 32K or larger, or 64K for C99.) Often it's a good idea to use data structures which don't require that all memory be contiguous. For dynamically-allocated multidimensional arrays, you can use pointers to pointers, as illustrated in questions 6.16 and 20.2. Instead of a large array of structures, you can use a linked list, or an array of pointers to structures.
__________________
Thanks & Regards
Sabari...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
looping structures in Ruby? vadivelanvaidyanathan Ruby 1 08-18-2007 01:53 AM
How can do test the Pointers & Structures? sundarraja Software Testing 1 07-30-2007 10:54 PM
What is the difference between structures and enumeration? anbuchezhians VB.NET Programming 1 07-28-2007 01:50 AM
Difference of Structures and Classes vigneshgets C and C++ Programming 1 05-24-2007 11:53 AM
Is Google bigger than yahoo? killerkev06 Google 0 03-18-2007 07:34 PM


All times are GMT -7. The time now is 09:07 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0