You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <sa...@gmail.com> on 2006/04/13 13:22:53 UTC
[Axis2]Guththila should be re organized[Fwd: svn commit: r393763
- /webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c]
Hi Dinesh,
IMHO, Guthtila code should be re-organized in line with the changes
taken place over the past few months in the main Axis2/C codebase.
We have improved the logging and error handling mechanisms.
We also have a well tested hash map and array list structures that
could be used by Guththila.
Please have a look into the source of the util module to get a gauge
on the improvements.
Thanks,
Samisa...
-------- Original Message --------
Subject: svn commit: r393763 -
/webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c
Date: Thu, 13 Apr 2006 08:46:21 -0000
From: dinesh@apache.org
To: axis2-cvs@ws.apache.org
Author: dinesh
Date: Thu Apr 13 01:46:19 2006
New Revision: 393763
URL: http://svn.apache.org/viewcvs?rev=393763&view=rev
Log:
guththila_stack_free () tends to memory leaks when there are no elements
Modified:
webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c
Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c?rev=393763&r1=393762&r2=393763&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c Thu Apr 13 01:46:19 2006
@@ -91,11 +91,13 @@
guththila_stack_t * stack)
{
if (stack && (stack->pointer > 0))
- {
+ {
guththila_element_t *ele = stack->tail;
guththila_stack_free_rec (environment, stack, ele);
GUTHTHILA_FREE (environment->allocator, stack);
}
+ else
+ GUTHTHILA_FREE (environment->allocator, stack);
}
Re: [Axis2]Guththila should be re organized[Fwd: svn commit: r393763
- /webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c]
Posted by Damitha Kumarage <da...@gmail.com>.
Samisa Abeysinghe wrote:
> Dinesh Premalal wrote:
>
>> Hi,
>>
>>
>>> We also have a well tested hash map and array list structures that
>>> could be used by Guththila.
>>>
>>
>> This would make our life easier, because guththila_stack seems to
>> lead lot
>> of memory leaks. Since Axis2/c has hash map and array list Ill be
>> able to use it to replace
>> guththila_stack code. Hope that array list and hash map doesn't have
>> any external dependencies.
>>
> No they are independent, except that they use the environemnt and the
> associated classes. We also have a stack, Nandika wrote one.
> I would suggest that you use them from Axis2/C util lib directly
> rather than coping the source into Guththila, so that it helps with
> regression. If we want, we can later seperate them, but I believe we
> can ship Axis2/C util as a seperate lib, you could do the same for
> envioronemnt and the related classes may be.
I also suggest to use axis2_util lib which is shipped with Axis2 C. Thre
is also an linked list in util. I also use util lib directly for Axis2 C
woden and Axis2C Xml Schema which are independant projects although
currently sit under Axis2 C svn.
>
> Samisa...
>
>>> Please have a look into the source of the util module to get a
>>> gauge on the improvements.
>>>
>>
>> Ill look on that code.Thanks for the pointer.
>>
>> cheers,
>> Dinesh
>>
>>
>>> Thanks,
>>> Samisa...
>>>
>>
>
>
Re: [Axis2]Guththila should be re organized[Fwd: svn commit: r393763
- /webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c]
Posted by Samisa Abeysinghe <sa...@gmail.com>.
Dinesh Premalal wrote:
>Hi,
>
>
>> We also have a well tested hash map and array list structures that
>>could be used by Guththila.
>>
>>
> This would make our life easier, because guththila_stack seems to lead lot
>of memory leaks. Since Axis2/c has hash map and array list Ill be able to use it to replace
>guththila_stack code. Hope that array list and hash map doesn't have any external
>dependencies.
>
>
No they are independent, except that they use the environemnt and the
associated classes. We also have a stack, Nandika wrote one.
I would suggest that you use them from Axis2/C util lib directly rather
than coping the source into Guththila, so that it helps with regression.
If we want, we can later seperate them, but I believe we can ship
Axis2/C util as a seperate lib, you could do the same for envioronemnt
and the related classes may be.
Samisa...
>> Please have a look into the source of the util module to get a
>>gauge on the improvements.
>>
>>
>Ill look on that code.Thanks for the pointer.
>
>cheers,
>Dinesh
>
>
>>Thanks,
>>Samisa...
>>
>>
Re: [Axis2]Guththila should be re organized[Fwd: svn commit: r393763 - /webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c]
Posted by Dinesh Premalal <di...@cse.mrt.ac.lk>.
Hi,
> We also have a well tested hash map and array list structures that
> could be used by Guththila.
This would make our life easier, because guththila_stack seems to lead lot
of memory leaks. Since Axis2/c has hash map and array list Ill be able to use it to replace
guththila_stack code. Hope that array list and hash map doesn't have any external
dependencies.
> Please have a look into the source of the util module to get a
> gauge on the improvements.
Ill look on that code.Thanks for the pointer.
cheers,
Dinesh
>
> Thanks,
> Samisa...
>
>
> -------- Original Message --------
> Subject: svn commit: r393763 -
> /webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c
> Date: Thu, 13 Apr 2006 08:46:21 -0000
> From: dinesh@apache.org
> To: axis2-cvs@ws.apache.org
>
>
>
> Author: dinesh
> Date: Thu Apr 13 01:46:19 2006
> New Revision: 393763
>
> URL: http://svn.apache.org/viewcvs?rev=393763&view=rev
> Log:
> guththila_stack_free () tends to memory leaks when there are no elements
>
> Modified:
> webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c
>
> Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c?rev=393763&r1=393762&r2=393763&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c (original)
> +++ webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_stack.c Thu Apr 13 01:46:19 2006
> @@ -91,11 +91,13 @@
> guththila_stack_t * stack)
> {
> if (stack && (stack->pointer > 0))
> - {
> + {
> guththila_element_t *ele = stack->tail;
> guththila_stack_free_rec (environment, stack, ele);
> GUTHTHILA_FREE (environment->allocator, stack);
> }
> + else
> + GUTHTHILA_FREE (environment->allocator, stack);
> }
>