Compiler Error 49

Posted on 1998-11-10
Last Modified: 2008-02-01
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?
Question by:schey

Author Comment

ID: 1216053
Edited text of question

Expert Comment

ID: 1216054
what are your compiler settings ? Do you use any directives such as $?- or $?+ etc. ?

Expert Comment

ID: 1216055
Try to move some data into run-time allocated pointers.

Expert Comment

ID: 1216056
I didn't know, this problem happens in Protected Mode too

Accepted Solution

vikiing earned 200 total points
ID: 1216057
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.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi TDBX too many connection problem 2 1,152
WebCam and Delphi 2 2,565
Convert date 6 400
how do i remove white background in node inside virtual TVirtualStringTree? 12 92
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now