axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <>
Subject Re: Idea about using axutil_string
Date Wed, 06 Jun 2007 07:56:54 GMT
Supun Kamburugamuva wrote:
> Hi,
> Actually what I meant by a String pool is a collection of
> axutil_string objects (not char strings) created prior to Axis2/C
> begins serving requests (at the startup). This applies regardless of
> the memory management system that we are using. The main idea is to
> allocate sufficient number of axutil_strings at the beginning i.e.
> 1024 in the pool. When a routine wants to use an axutil_string it can
> get an already allocated one from the pool rather than creating a
> axutil_string (allocating a axutil_string) at that moment. When an
> axutil_string is no longer required, instead of freeing the
> axutil_string it should be released to the pool. 

I do not think pooling strings make sense. Each and every sting has its 
own size. So there is no point in re-using a string struct, because the 
buffer needs to be reallocated each time a new string is required - 
because we do not have prior knowledge on the size of the next string 
that we need. That is why I said what we need is a memory pool, because 
we need to allocated the buffer of the string from the pool.
> The advantage is that
> all the axutil_strings are allocated contiguously in the memory. So
> this will lead to high performance string handling.
If we are going to use the set of strings continuously, there could be 
performance gain here. However, the strings are used at various places 
in the execution chain. So I am not sure of the performance implications 
that you are talking about.

> Regards,
> Supun.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Samisa Abeysinghe :

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message