3:03 AM
> To: Palm Developer Forum
> Subject: Re: Question on a routine
>
>
> * Keith Rollin <[EMAIL PROTECTED]> [2003-06-26 08:43 -0700]:
>
> > The prevalent use of this technique throughout the early Palm OS
> > source code and samples lead me to believe
* Keith Rollin <[EMAIL PROTECTED]> [2003-06-26 08:43 -0700]:
> The prevalent use of this technique throughout the early Palm OS
> source code and samples lead me to believe that the author just
> didn't know about offsetof. It was only in later versions of the OS
> and SDK (around Palm OS 3.5, I t
Thanks.
"James" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???...
>
> DongDong wrote:
> >
> > Why could author assume the base address equal to zero? As most C
> > programmer know, memory should be allocated by system. The pointer
> > shouldn't be assigned an absolute address, even address 0x
DongDong wrote:
>
> Why could author assume the base address equal to zero? As most C
> programmer know, memory should be allocated by system. The pointer
> shouldn't be assigned an absolute address, even address 0x.
>
> Is the address zero under Palm OS free to use? I'm confused.
> Welcome
Dong [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 8:44 AM
> To: Palm Developer Forum
> Subject: Re: Question on a routine
>
> Why could author assume the base address equal to zero? As
> most C programmer
> know, memory should be allocated by system. The pointer shouldn
s
> ---
> [EMAIL PROTECTED]
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> DongDong
> Sent: Thursday, June 26, 2003 10:23 AM
> To: Palm Developer Forum
> Subject: Re: Question on a routine
>
>
>
> From: DongDong [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 8:44 AM
> To: Palm Developer Forum
> Subject: Re: Question on a routine
>
> Why could author assume the base address equal to zero? As
> most C programmer
> know, memory should be allocate
> From: Brian Smith [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 8:00 AM
> To: Palm Developer Forum
> Subject: RE: Question on a routine
>
> On Thu, 26 Jun 2003 [EMAIL PROTECTED] wrote:
>
> > Then the expression:
> >
> > &packed-&
<[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???...
>
> Yes, I remember staring at that code myself. It's kind of grungy.
>
> In:
>
> LibPackedDBRecord *packed=0;
>
> "packed" is simply a pointer (32-bits for Palm platform) so this just
> initializes it to zero. Typically, you would say it as:
scribed in the "Palm OS
Programming Bible". I don't know why the author didn't use it.
Dennis Leas
---
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
DongDong
Sent: Thursday, June 26, 2003 10:23 AM
To: Palm Develop
But every memory chunk should be locked before use. There is no code to lock
that memory chunk. How can it be used?
<[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???...
>
> Yes, I remember staring at that code myself. It's kind of grungy.
>
> In:
>
> LibPackedDBRecord *packed=0;
>
> "packed" is
On Thu, 26 Jun 2003 [EMAIL PROTECTED] wrote:
> Then the expression:
>
> &packed->status
>
> is the offset of the "status" member from the base address of a
> LibPackedDBRecord. Note that &packed->status does not reference the
> value of "status" but only yields the offset of "status". DmWr
Yes, I remember staring at that code myself. It's kind of grungy.
In:
LibPackedDBRecord *packed=0;
"packed" is simply a pointer (32-bits for Palm platform) so this just
initializes it to zero. Typically, you would say it as:
LibPackedDBRecord *packed=NULL;
but the author (I t
13 matches
Mail list logo