Re: new and delete in Palm

2003-08-19 Thread Viren
Thanks Dave and Ben for the answers and sorry for the rather late reply. Ben, I also read an article of yours Inside the Palm OS :... where you have described in details the StartUp routine in PalmOS in details. A good thing to know for all the aplm adevelopers. Thanks again. -Viren --- In

Re: new and delete in Palm

2003-08-14 Thread Dave Carrigan
On Wed, Aug 13, 2003 at 07:42:06PM -, drvirens wrote: Dave, would you please take this opportunity and let us know furhter in this direction ? I have read somewhere that palm devices dont have any MMU. Let me keep it in this way please...My understadning is that Palm OS does not

RE: new and delete in Palm

2003-08-14 Thread Ben Combee
At 05:34 AM 8/13/2003, Mayank Babu Rastogi, Noida wrote: Hi Chris, Thanks. Palm OS 5 API reference document doesn't talk about new and delete. Is there any additional library which provides these functions ? They aren't mentioned in the API reference as these aren't OS functions, but the

Re: new and delete in Palm

2003-08-14 Thread Dave Carrigan
On Wed, Aug 13, 2003 at 10:11:29PM -, drvirens wrote: Dave, The 64K limitation I think is an arbitrary choice. If I recall correctly, the chunk header allows up to 16M chunks, but they limit it to 64K because the hotsync protocol only supports up to 64K record sizes. Again, I

Re: new and delete in Palm

2003-08-14 Thread Dave Carrigan
On Wed, Aug 13, 2003 at 12:57:15PM -, drvirens wrote: AFAIK, the implementation of new keyowrd on Palm is such that it always calls the MemPtrNew() API of the Memory Manager internally...so you are really given a direct physical address by the system. Since this poiner is not locked,

Re: new and delete in Palm

2003-08-14 Thread Ben Combee
The 64K limitation I think is an arbitrary choice. If I recall correctly, the chunk header allows up to 16M chunks, but they limit it to 64K because the hotsync protocol only supports up to 64K record sizes. Palm OS 1.0 and 2.0 had memory heaps that were limited to 64K, so it wasn't actually

Re: new and delete in Palm

2003-08-14 Thread Ben Combee
At 05:36 AM 8/13/2003, Chris Apers wrote: Don't think so, just enable C++ compiler in your project. I use them with no problem. Don't use the Enable C++ Compilation switch in CodeWarrior. CW will always build a .cpp or .c files as C++. This switch just forces it to also build .c files as C++,

Re: new and delete in Palm

2003-08-14 Thread Paul Johnson
10:29 PM Subject: Re: new and delete in Palm On Wed, Aug 13, 2003 at 07:42:06PM -, drvirens wrote: Dave, would you please take this opportunity and let us know furhter in this direction ? I have read somewhere that palm devices dont have any MMU. Let me keep it in this way please

RE: new and delete in Palm

2003-08-14 Thread Keith Rollin
, 2003 3:35 AM To: Palm Developer Forum Subject: RE: new and delete in Palm Thanks. Palm OS 5 API reference document doesn't talk about new and delete. Is there any additional library which provides these functions ? -- For information on using the Palm Developer Forums, or to unsubscribe

Re: new and delete in Palm

2003-08-14 Thread drvirens
Dave, You're wrong on this part. MemPtrNew allocates a non-movable chunk that is immune to compaction or defragmentation. MemHandleNew allocates a movable chunk that will be essentially flagged as non-movable when you lock it with MemHandleLock. Yikes!! :-P Thanks Dave for that piece of

Re: new and delete in Palm

2003-08-14 Thread Dave Carrigan
On Wed, Aug 13, 2003 at 04:04:56PM +0530, Mayank Babu Rastogi, Noida wrote: Thanks. Palm OS 5 API reference document doesn't talk about new and delete. Is there any additional library which provides these functions ? new and delete are C++ keywords. Why would they be documented in the PalmOS

Re: new and delete in Palm

2003-08-14 Thread Ben Combee
At 05:19 AM 8/13/2003, Mayank Babu Rastogi, Noida wrote: Hi, I'm supposed to port a C++ application from Windows to Palm. This application heavily uses standard C++ library functions - new and delete for memory allocation/deallocation . As per my understanding, new and delete are not supported

Re: new and delete in Palm

2003-08-14 Thread drvirens
Dave, The 64K limitation I think is an arbitrary choice. If I recall correctly, the chunk header allows up to 16M chunks, but they limit it to 64K because the hotsync protocol only supports up to 64K record sizes. Again, I have a doubt. Sorry for this Dave. But I am not gettin why would

Re: new and delete in Palm

2003-08-14 Thread Chris Apers
new and delete work fine on PalmOS but it use the dynamic heap which can be very limited on some devices (mainly TT and TT2) so you can really use large objects. Also take care to not use big tables on your code if you try to allocate a UInt16 table[64000] it while crash your app. Hi, I'm

Re: new and delete in Palm

2003-08-14 Thread drvirens
Hey Mayank, I'm supposed to port a C++ application from Windows to Palm. Ah well! One more windows app gets on palm. cool. :-) This application heavily uses standard C++ library functions Hmmm. So please be advised that other than new and delete, you would have to take care of the

RE: new and delete in Palm

2003-08-14 Thread Mayank Babu Rastogi, Noida
Developer Forum Subject: Re: new and delete in Palm new and delete work fine on PalmOS but it use the dynamic heap which can be very limited on some devices (mainly TT and TT2) so you can really use large objects. Also take care to not use big tables on your code if you try to allocate a UInt16 table

64K limit in Palm ( was Re: new and delete in Palm )

2003-08-14 Thread drvirens
Thanks Ben! Didn't see that post and posted the question which you already had answered. Thanks Dave too for your reply. -Viren -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Re: new and delete in Palm

2003-08-14 Thread Chris Apers
Don't think so, just enable C++ compiler in your project. I use them with no problem. Hi Chris, Thanks. Palm OS 5 API reference document doesn't talk about new and delete. Is there any additional library which provides these functions ? regards, Mayank -- For information on using the

Re: new and delete in Palm

2003-08-14 Thread TVS Deepak
Hi Mayank, MemPtrNew and MemPtrFree can be used for new/delete. Deepak - Original Message - From: Mayank Babu Rastogi, Noida [EMAIL PROTECTED] To: Palm Developer Forum [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 3:49 PM Subject: new and delete in Palm Hi, I'm supposed to port

new and delete in Palm

2003-08-14 Thread Mayank Babu Rastogi, Noida
Hi, I'm supposed to port a C++ application from Windows to Palm. This application heavily uses standard C++ library functions - new and delete for memory allocation/deallocation . As per my understanding, new and delete are not supported in Palm. What could be the best alternative to these