henryxu wrote:
> I have 3 sections in my application, and I have met something like "multi 
> section error, section XXX is Full" before.
> 
> But this time it seems a little difference from last time, what's the problem 
> and what can I do? (what's the .bss?)

".bss" comes from assembly language.  It is a directive for
specifying that the stuff in that section is global data.
It corresponds to what is called "static data" in C.

This time you filled up the data segment rather than a code segment.

AFAIK, it's not possible to create a second data segment, so you
have to resort to other kludgy methods to get your data segment
back under the limit.  Such as allocating data dynamically and
initializing it during execution, rather than declaring it static
and initializing it in advance.  (Basically, this is a way to
turn a static data into code.)

As a really simple and stupid example, instead of doing

----------------- static allocation -------------
#define NUMINTS
int array[NUMINTS];
----------------- static allocation -------------

You do something like,

================= dynamic allocation ===============
#define NUMINTS
int *array;

init_globals()
{
        array = (int *) malloc(NUMINTS*sizeof(int));
}
================= dynamic allocation ===============

(This needs to have about 5 or so extra comments,
such as you may need to use MemHandleNew() instead
of malloc(), and remember to free your memory, etc.)

This is as far as I understand it, which is not far.
I haven't been forced to deal with this yet.

Jay
-- 
When we stop playing the game, there is no game.
        - David Icke

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to