Article # 133, added by Geoworks, historical record
| first | previous | index | next | last |

What's stored in dgroup?



There is no "okay" size for dgroup, you should strive to minimize its
size as much as possible. The dgroup block contains:
 - class structures
 - global variables
 - static local variables
 - static constants and strings that are not in chunks
 - the process thread's stack

If you have static data, like strings, they should be put into chunks
in a data resource. For example, this will get put in dgroup:

	char myLocalStr = "This is a static string\n"

You can use @chunk to put the string in a data resource (see the
sample applications SDK_C\Serial and Serial2).

Other global and static variables should be put into chunks in a data
resource or incorporated into the instance data of an object. The
latter option is best if the variable is mainly used by a single
object.

There isn't much you can do about the class definition table unless
you can consolidate several classes into one, or move the class definition
table into another resource. Moving class definitions into another fixed
block is arguably worse than keeping them all in dgroup.