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 "Damitha Kumarage (JIRA)" <ji...@apache.org> on 2009/06/20 12:10:07 UTC

[jira] Created: (AXIS2C-1377) switching to global/local pools when used with apache module

switching to global/local pools when used with apache module
------------------------------------------------------------

                 Key: AXIS2C-1377
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1377
             Project: Axis2-C
          Issue Type: Improvement
          Components: util
         Environment: all
            Reporter: Damitha Kumarage
            Assignee: Damitha Kumarage


When Axis2/C is used with the httpd module to allocate memory in apache global pools one need to call the axutil function axutil_allocator_switch_to_global_pool. To switch back again to use apache local pool(request level allocation) one need to call the axutil_allocator_swith_to_local_pool.
However there could be problematic situations if used this carelessly. For example consider the following scenario.

swith_to_global

...do something...

switch_to_global

...do something

swith_to_local

!!! Now am I using global memory or local memory?.  Ideally now I should still be using global memory. But accoring to current Axis2/C implementation at this stage I'm using local memory. This could lead to unavoidable problems.

Attached patch fix this.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2C-1377) switching to global/local pools when used with apache module

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage updated AXIS2C-1377:
-------------------------------------

    Attachment: allocator_switching.diff

Patch providing the solution

> switching to global/local pools when used with apache module
> ------------------------------------------------------------
>
>                 Key: AXIS2C-1377
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1377
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: util
>         Environment: all
>            Reporter: Damitha Kumarage
>            Assignee: Damitha Kumarage
>         Attachments: allocator_switching.diff
>
>
> When Axis2/C is used with the httpd module to allocate memory in apache global pools one need to call the axutil function axutil_allocator_switch_to_global_pool. To switch back again to use apache local pool(request level allocation) one need to call the axutil_allocator_swith_to_local_pool.
> However there could be problematic situations if used this carelessly. For example consider the following scenario.
> swith_to_global
> ...do something...
> switch_to_global
> ...do something
> swith_to_local
> !!! Now am I using global memory or local memory?.  Ideally now I should still be using global memory. But accoring to current Axis2/C implementation at this stage I'm using local memory. This could lead to unavoidable problems.
> Attached patch fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AXIS2C-1377) switching to global/local pools when used with apache module

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage resolved AXIS2C-1377.
--------------------------------------

    Resolution: Fixed

Attached patch solve the issue

> switching to global/local pools when used with apache module
> ------------------------------------------------------------
>
>                 Key: AXIS2C-1377
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1377
>             Project: Axis2-C
>          Issue Type: Improvement
>          Components: util
>         Environment: all
>            Reporter: Damitha Kumarage
>            Assignee: Damitha Kumarage
>         Attachments: allocator_switching.diff
>
>
> When Axis2/C is used with the httpd module to allocate memory in apache global pools one need to call the axutil function axutil_allocator_switch_to_global_pool. To switch back again to use apache local pool(request level allocation) one need to call the axutil_allocator_swith_to_local_pool.
> However there could be problematic situations if used this carelessly. For example consider the following scenario.
> swith_to_global
> ...do something...
> switch_to_global
> ...do something
> swith_to_local
> !!! Now am I using global memory or local memory?.  Ideally now I should still be using global memory. But accoring to current Axis2/C implementation at this stage I'm using local memory. This could lead to unavoidable problems.
> Attached patch fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.