Re: How to optimize for win ce developlemnet
From: Paul G. Tobey [eMVP] (ptobey_no_spam_at_instrument_no_spam.com)
Date: 02/03/04
- Next message: Doug Forster: "Re: Do you lose classes from your class list?"
- Previous message: Steve Maillet \(eMVP\): "Re: Finding Storage Card Names"
- In reply to: Jim: "Re: How to optimize for win ce developlemnet"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 3 Feb 2004 12:33:13 -0700
There's not really any way to avoid that type of thing. More often than
not, in C, you *meant* to do that kind of thing. You might declare a
structure something like this:
typedef
struct
{
int count
long list[ 1 ];
} x;
Where your intent is to use count as the number of items in the list, rather
than somehow limiting the list to one element, as it's declared. C assumes
that you know what you're doing and mean to do what you say.
If you want some kind of checked access array, you can build one using C++,
by overloading the [] operator and checking some kind of length field before
allowing the operation...
Paul T.
"Jim" <jimy_mystry@rediffmail.com> wrote in message
news:%23uSfwDh6DHA.1368@TK2MSFTNGP10.phx.gbl...
> Thanks paul for your advice. But my Question is specific to a problem. I
was
> testing one of the interface on emnulator and it was working ok there but
> once i loaded the image onto the target device the screen start
disapearing.
> Something like i'm trying to open a window thru menu item and the desired
> screen was opening up. The reason there was probably a variable whose size
> was comparatively bigger in declartion. So how to avoid such conditions?
>
> "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
> message news:#mXs$fa6DHA.2692@TK2MSFTNGP09.phx.gbl...
> > Well, there are not going to be any hard-and-fast rules, other than
> > 'maximums'. Don't try to allocate MB and MB of RAM all at one time, as
> your
> > process is limited to a maximum of 32MB (and the device might only have
> that
> > much, limiting you further).
> >
> > Performance should be optimized when you find problems. There's no use
> > globally optimizing your code, at the cost of many weeks or months,
unless
> > the first pass is not fast enough. If it turns out to be too slow, you
> can
> > concentrate on the part that is slow, rather than trying to optimize
> > everything...
> >
> > Paul T.
> >
> > "Jim" <jimy_mystry@rediffmail.com> wrote in message
> > news:u2GxhnX6DHA.1752@tk2msftngp13.phx.gbl...
> > > Hi guys,
> > >
> > > Can someone suggest me the best way of optimizing my code and memory
> usage
> > > while iam developing and application for wince.net based hand held
> > devices?
> > >
> > > What all i need to keep in mind for the same.
> > >
> > > -Jim
> > >
> > >
> >
> >
>
>
- Next message: Doug Forster: "Re: Do you lose classes from your class list?"
- Previous message: Steve Maillet \(eMVP\): "Re: Finding Storage Card Names"
- In reply to: Jim: "Re: How to optimize for win ce developlemnet"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|