Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can I allocate arrays or structures bigger than 64K?
How can I allocate arrays or structures bigger than 64K?
✍: Guest
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, Instead of a large array of structures, you can use a linked list, or an array of pointers to structures.
If you're using a PC-compatible (8086-based) system, and running up against a 64K or 640K limit, consider using ``huge'' memory model, or expanded or extended memory, or malloc variants such as halloc or farmalloc, or a 32-bit ``flat'' compiler , or some kind of a DOS extender, or another operating system.
2015-03-30, 1299👍, 0💬
Popular Posts:
What are the different elements in Functions points? The different elements in function points are a...
How To Return the Second 5 Rows? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If yo...
If cookies are not enabled at browser end does form Authentication work? No, it does not work.
Can we have static indexer in C# ? No.
What is the concept of XPOINTER? XPOINTER is used to locate data within XML document. XPOINTER can p...