Board index » delphi » 64K Data Size Limits and CTE 49 {Data Segment}

64K Data Size Limits and CTE 49 {Data Segment}

I use TPv5.5 which has a 64K limit on total data size.
I have two applications {main app & menu} that I would like to combine into
one, but naturally, I get Error 49 at compile time.
My main app is already nearing the 64K data limit and I've gone to external
files and using pointers to allow for other data to be stored internally
{indexes and counters, etc.}

Q. Does TPv7.0 have the same 64K data size limit restriction?
Please do NOT confuse this with the 64K FILE SIZE limit on units or programs!

James Richard
Fred Bonner
TOUCHSCREEN PROMOTIONS
E-Mail: I...@TouchscreenPromotions.com
http://www.touchscreenpromotions.com/
Tel: 902.876.7781

 

Re:64K Data Size Limits and CTE 49 {Data Segment}


Quote
TOUCHSCREEN PROMOTIONS wrote:
> Q. Does TPv7.0 have the same 64K data size limit restriction?

The data segment cannot exceed 64k in TP 7.0.

Re:64K Data Size Limits and CTE 49 {Data Segment}


Quote
TOUCHSCREEN PROMOTIONS wrote:

> I use TPv5.5 which has a 64K limit on total data size.

Please read:
"Turbo Pascal memory considerations, Pointer Primer"
and "Dynamic arrays" (for rather skilled programmers) in
the FAQ page of the TP-links:
http://www.geocities.com/SiliconValley/2926/tp.html

The 64K restrictions, which you mentioned, apply to all
16-bit programs, regardless of the compiler version and
brand. And the circumvention using the heap is the same
too.

Franz Glaser

Re:64K Data Size Limits and CTE 49 {Data Segment}


In article <36728E6D.407BA...@eunet.at>,
  "Ing. Franz Glaser" <meg-gla...@eunet.at> wrote:

Quote
> TOUCHSCREEN PROMOTIONS wrote:

> > I use TPv5.5 which has a 64K limit on total data size.

> Please read:
> "Turbo Pascal memory considerations, Pointer Primer"
> and "Dynamic arrays" (for rather skilled programmers) in
> the FAQ page of the TP-links:
> http://www.geocities.com/SiliconValley/2926/tp.html

> The 64K restrictions, which you mentioned, apply to all
> 16-bit programs, regardless of the compiler version and
> brand. And the circumvention using the heap is the same
> too.

Depending on stack and heap requirements, you can potentially use 128K of
more-or-less global variables, by coding:

program more_ds;
var
  ...

const
  ...

procedure main;
var
  ... {lots more variables}

procedure example1;
function example2: whatever;

begin
.
.
.
end; {main}

begin
  main
end.

Obviously the size of your code will increase rather a lot when example1 etc
heavily access the local variables in main...

Robert
--
Robert AH Prins
prin...@williscorroon.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Other Threads