[EMAIL PROTECTED] wrote:

Hi,

I am currently trying to make gSoap work on a PalmOs v5.2H and I have some 
problems with it. In fact, I don't manage to make gSoap work with web service's 
big replies.

So I was trying severals things :

First, I made a simple web service which takes a number 'n' and then reply by 
sending a string of 'n' characters. When 'n' is small, there are no problems. 
However, when 'n' is around 300, the Palm crashes and reset itself (without 
errors). Nevertheless, there is no static limit of 'n'. It depends on a fact I 
can't see.

I try so to find why gSoap crashes by learning how the PalmOS deals with 
memory. gSoap uses malloc and so I ask myself what are the limits of PalmOS 
memory ? What are the malloc() specifications etc... ?

Then, I can remark that malloc doesn't return NULL when it can't give memory. 
So to test the allocated memory, I write in the area returned by malloc (if it 
is not good, the Palm crashes :) ). I have made also a small CodeWarrior 
project to test the malloc and see its limit.

Here is my story. Now my question is : why does gSoap crash ? Did i miss a 
compilation option ? gSoap uses malloc : from where does malloc take the memory 
? How much memory can I get with malloc ? is malloc the better solution for 
large memory allocation (in knowledge database, it says to use 'MemGluePtrNew' 
whereas in the dev documentation, it says to use 'malloc') ?

you can see some files on my problems on http://www.epita.fr/~guiran_a/ .

Any sort of help will be useful :)

P.S.: sorry for my bad english :S


Hi Patrick,

replace malloc with MemPtrNew() for size < 64k or MemGluePtrNew() for all sizes. Both return NULL in case of a failure. That's for sure.

Regards
Henk

--
-------------------------------------------------------------------------
  Henk Jonas                                            [EMAIL PROTECTED]
  Palm OS ® certified developer

  Please contact me, if you need an off-site contract worker.
-------------------------------------------------------------------------

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

Reply via email to