Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 579
  • Last Modified:

DGROUP exceeds 64K

How do you set borlandc 3.1 comipler''s datasize threshold that it does not use the DEFAULT group as much so the error above doesn't occure
0
odedhanson
Asked:
odedhanson
1 Solution
 
jos010697Commented:
AFAIK you can't; all golbal variables are squeezed in one
single segment of memory; in other words: you have too
many global variables. There's a cheapo workaround though:

check for large arrays and convert them to pointers. At
startup first allocate enough memory for the array and make
this pointer point to it. Another trick that might work (it
depends on where your compiler/linker stores static local
variables) works as follows:

Suppose you had this:

int my_array[SOME_HUGE_NUMBER];

change it into this:

int* my_array;

void init_my_array() {

static int my_array_local[SOME_HUGE_NUMBER];

my_array= my_array_local;

}

At startup, simply call init_my_array().

kind regards,

Jos aka jos@and.nl
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now