Large Arrays in MS-DOS Environment 
Author Message
 Large Arrays in MS-DOS Environment



Quote:
> I am doing some image processing algorithm for a project in a DOS
> environment.  Somehow or another, I need an array that is about 480K
> large.

Standard C (which is all that we discuss here) does not guarantee that you
can have a single object which is larger than 32k.

Quote:
> Tried far pointers, again no go.

Far pointers are not a feature of standard C.

Quote:
> Is there anyway I can go about this limitation?  I have already set my
> memory model to Huge.

Memory models are not a feature of standard C.

You may get good advice from a platform-specific group.  I've elided the
portion of your article which says that you're using Turbo C; if
comp.os.msdos.programmer proves unhelpful, try one of the Borland/Inprise
groups.

Note also that compilers are available for MSDOS which use a flat 32-bit
memory model; a well-regarded free one is DJGPP (comp.os.msdos.djgpp).

Quote:
> Please email back to me as I seldom access the newsgroups.

No.  You post here, you read here.  Welcome to Usenet.

--



Tue, 02 Jan 2001 03:00:00 GMT  
 Large Arrays in MS-DOS Environment
Hi,
    I am doing some image processing algorithm for a project in a DOS
environment.  Somehow or another, I need an array that is about 480K
large.  However, when I compile my program in TurboC V3.0, I get an
error message that the array should not be larger than 64K.
    So I tried using pointers and malloc().  No use.  Tried far
pointers, again no go.  The program will hang with Memory Allocation
Error.
    Is there anyway I can go about this limitation?  I have already set
my memory model to Huge.
    It will be evn better if I can have 2 of such arrays!  Hope some of
you can help me out on this.  Thanks in advance.  Please email back to
me as I seldom access the newsgroups.
    BTW, the environment has to be DOS and not NT, 95 or others.

With Regards,
Foo Leong



Wed, 03 Jan 2001 03:00:00 GMT  
 Large Arrays in MS-DOS Environment
On Sat, 18 Jul 98 12:36:15 GMT, Lawrence Kirby

[C-faq in his sig!]

Now, that's an idea!

--

http://www.cs.wustl.edu/~jxh/        Washington University in Saint Louis

Quote:
>>>>>>>>>>>>> I use *SpamBeGone* <URL:http://www.internz.com/SpamBeGone/>



Wed, 03 Jan 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Question : xalloc'ing a large (128K) char array (MS-DOS)

2. questions about a backup program for the MS-DOS environment

3. HELP!: Resetting DOS Environment Variables from MS-Windows 3.1

4. problems with compiling large project under gcc + ms-dos

5. Help: Large 3-d Arrays, work in unix, not in dos

6. Large Arrays under DOS Borland C++ v5.02

7. Large arrays in MSDOS

8. Help Novice on large arrays in DOS

9. Help: Large 3-d Arrays, work in unix, not in dos

10. A problem with very large arrays and memory in DOS-based C

11. sbrk() in MS C 5.1 on MS-DOS

12. MFC 2.5 in MS-DOS with DOS extender DOS4GW 32 bit

 

 
Powered by phpBB® Forum Software