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 "David Bertoni (JIRA)" <xe...@xml.apache.org> on 2008/06/27 21:39:45 UTC

[jira] Created: (XERCESC-1815) Propagate MemoryManager into transcoders

Propagate MemoryManager into transcoders
----------------------------------------

                 Key: XERCESC-1815
                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
             Project: Xerces-C++
          Issue Type: Bug
          Components: Utilities
    Affects Versions: Nightly build (please specify the date)
            Reporter: David Bertoni
            Assignee: David Bertoni
         Attachments: patch.diff

This patch propagates a MemoryManager instance into the transcoders, so they don't inadvertantly use the global MemoryManager instance.

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


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


[jira] Updated: (XERCESC-1815) Propagate MemoryManager into transcoders

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni updated XERCESC-1815:
-----------------------------------

    Attachment: patch.diff

> Propagate MemoryManager into transcoders
> ----------------------------------------
>
>                 Key: XERCESC-1815
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: Nightly build (please specify the date)
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This patch propagates a MemoryManager instance into the transcoders, so they don't inadvertantly use the global MemoryManager instance.

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


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


[jira] Commented: (XERCESC-1815) Propagate MemoryManager into transcoders

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613160#action_12613160 ] 

Boris Kolpackov commented on XERCESC-1815:
------------------------------------------

David, are you still planning to commit this patch or do you want me to commit it?

> Propagate MemoryManager into transcoders
> ----------------------------------------
>
>                 Key: XERCESC-1815
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: Nightly build (please specify the date)
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This patch propagates a MemoryManager instance into the transcoders, so they don't inadvertantly use the global MemoryManager instance.

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


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


[jira] Commented: (XERCESC-1815) Propagate MemoryManager into transcoders

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609919#action_12609919 ] 

Boris Kolpackov commented on XERCESC-1815:
------------------------------------------

I agree we should probably remove defaulting to fgMemoryManager from interfaces that are normally not used by the end user (e.g., XMLMutex). If, howevere, the API is used by the end user, making them pass fgMemoryManager explicitly is too much. So if makeNewLCPTTranscoder() is not normally called by the end user then I agree we should not make its argument default to fgMemoryManager.


> Propagate MemoryManager into transcoders
> ----------------------------------------
>
>                 Key: XERCESC-1815
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: Nightly build (please specify the date)
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This patch propagates a MemoryManager instance into the transcoders, so they don't inadvertantly use the global MemoryManager instance.

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


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


[jira] Commented: (XERCESC-1815) Propagate MemoryManager into transcoders

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609762#action_12609762 ] 

David Bertoni commented on XERCESC-1815:
----------------------------------------

A few comments:

1. In general, I'm opposed to a default parameter for the MemoryManager.  When we first did the pluggable memory management implementation, MemoryManager parameters were propagated throughout the code, which defaulted to the global instance.  This caused a huge number of bugs where the global instance was used implicitly when it should not have been.  These bugs are extremely difficult to find, because they had to be diagnosed at run time, rather than at compile time.

I'd prefer to make it more difficult for that sort of thing to happen in the future.  Particularly in this case, because I doubt makeNewLCPTTranscoder() occurs in any user code.

2. +1 to removing the default argument.  If I had the time, and there were no objections, I'd remove them from almost every API, reserving them for the more public things like InputSource, etc.

> Propagate MemoryManager into transcoders
> ----------------------------------------
>
>                 Key: XERCESC-1815
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: Nightly build (please specify the date)
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This patch propagates a MemoryManager instance into the transcoders, so they don't inadvertantly use the global MemoryManager instance.

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


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


[jira] Commented: (XERCESC-1815) Propagate MemoryManager into transcoders

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609695#action_12609695 ] 

Boris Kolpackov commented on XERCESC-1815:
------------------------------------------

Hi David,

The patch looks good overall. I have a couple of suggestions:

1. Why not make the MemoryManager argument in XMLTransService::makeNewLCPTTranscoder() default to fgMemoryManager just like other makeNew* functions in this interface? I am sure most users will want fgMemoryManager when calling this function.

2. I thought one of the goals of this patch was to make sure XMLMutex is constructed using the same memory manager as the containing object (it is rarely created by itself). In this case perhaps we should remove the default argument (fgMemoryManager) from its c-tor.

What do you think?

Boris


> Propagate MemoryManager into transcoders
> ----------------------------------------
>
>                 Key: XERCESC-1815
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: Nightly build (please specify the date)
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This patch propagates a MemoryManager instance into the transcoders, so they don't inadvertantly use the global MemoryManager instance.

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


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


[jira] Commented: (XERCESC-1815) Propagate MemoryManager into transcoders

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613185#action_12613185 ] 

David Bertoni commented on XERCESC-1815:
----------------------------------------

I'll do it, but thanks for offering!

> Propagate MemoryManager into transcoders
> ----------------------------------------
>
>                 Key: XERCESC-1815
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: Nightly build (please specify the date)
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This patch propagates a MemoryManager instance into the transcoders, so they don't inadvertantly use the global MemoryManager instance.

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


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