Compiler Error 49

When I try to compile one large DPMI program, I got a Compiler Error 49 (Data segment too large). But all Data I have for the data segment have only about 40kb. Is there any solution for this problem?
scheyAsked:
Who is Participating?
 
vikiingConnect With a Mentor Commented:
The maximum data-size Pascal can handle must lie withing one segment, this is, 64 Kb (actually 65520 bytes due to some bytes of overhead).

If compiler is notifying you the excess, you surely has something that's going beyond 64 K, keep in mind that a single mistake in Var section (for example: a "0" added at an array declaration multiplies its size by 10). You always can allocate dynamic structures (using "New" procedure at run-time), which are defined at another segment, thus enabling you to go over the one-segment limit.
0
 
scheyAuthor Commented:
Edited text of question
0
 
omsecCommented:
what are your compiler settings ? Do you use any directives such as $?- or $?+ etc. ?
0
 
FuzzyLogicCommented:
Try to move some data into run-time allocated pointers.
0
 
omsecCommented:
I didn't know, this problem happens in Protected Mode too
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.