You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by jalal <he...@yahoo.co.uk> on 2001/12/05 15:03:44 UTC

Re[2]: Use of Transcode...

Thanks for the feedback Samar. Guess I'll take it case by case.

jalal


On Tue, 4 Dec 2001 10:10:14 -0800 Samar Lotia <sl...@siebel.com> wrote:

> IMHO, in the best scenario, you should pass in the buffer yourself. This
> way
> you can optimzie whether the buffer is allocated on the stack or the
> heap.
> Also, you can control how you release the memory for the buffer, i.e.
> what
> particular allocator you are using etc.
> 
> On the other hand, the method where Xerces allocates the memory is the
> easiest, i.e. you don't have to make sure your buffer is big enough, etc.
> 
> Take your pick. I prefer to use the first method, because we have issues
> with mixed allocators in our product, and it also allows me to optimize
> heap
> access.
> 
> If your application is not sensitive to heap access (i.e. this could be
> an
> issue in certain heavily multithreaded server applications) and you do
> not
> have issues with different allocators being used then the second method
> is
> probably best, as it is the most convenient and allows you to let Xerces
> determine buffer size etc.
> 
> Samar



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org