On 23 Sep 2000, at 0:00, Palm Developer Forum digest wrote:
> Subject: Re: PrcTools, Ultralite, Data segment
> From: Aaron Ardiri <[EMAIL PROTECTED]>
> Date: Fri, 22 Sep 2000 11:45:58 +0200 (MET DST)
> X-Message-Number: 9
>
> > Can anyone help me withthat? Problem is, that generated ultralite
> > file shows (objdump) more then 50kB long .data segment.
>
> 50K data segment? what the hell are you storing there? can you
> not store this data in a resource? if you use prc-tools 2.0, then
> you can do this using the
>
> HEX
> DATA
>
> tags of pilrc, to include a "binary" resource. if your data is
> read-only, you just get the resource (handle) and lock it to get
> the pointer..
May be, but I don't know how to do it... I use one very long
generated source (by Ultralite generator from Sybase), which includes
a lot of classes and stuff - This file shows about 50kb of .data (I
am afraid that's because of a lot of classes, I read that virtual
tables are included as global data).
But how is it possible, that metrowerks compiles without
tpoblems?" Is this 32kb segmenst only feature/bug of prc-tools?
>
> > I am quite good in using gcc, but this segments will kill me :-( (oh,
> > sweet x86 & linux....)
>
> 32K limit on data segments..
segments sux, sux, sux...
>
> globals dont work that well with "multi segments". i got around this
> by not using globals at all.. well.. kinda :P i dont store a reference
> to the global data as a global variable (hence, in the .data segment)
> instead.. i allocate memory dynamically, store its value in a feature
> and then, when i need to access it, i get the value from the feature
> and type cast it into a pointer.
>
My own globals aren't so big, they will fit into 7-8 kb now, and
can be optimized to less. But your idea is nice ;-)
thnx for answer, bye
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/