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 "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2013/10/01 20:30:23 UTC

[jira] [Resolved] (XERCESC-2019) Error in memory allocation for even small messages.

     [ https://issues.apache.org/jira/browse/XERCESC-2019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-2019.
--------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.1.1)
                   3.2.0
         Assignee: Alberto Massari

Xerces has always been conservative with the memory it had allocated, i.e. it never deallocated the memory of a DOMText node when an append() was called, to avoid crashing the client code that had retrieved the previous pointer via a call to getNodeValue(). In your case this implied allocating a lot of intermediate memory blocks before the 250Mb needed by your Base64 string were finally allocated. I have checked in a workaround that allows the parser (and only the parser) to deallocate them. 

> Error in memory allocation for even small messages.
> ---------------------------------------------------
>
>                 Key: XERCESC-2019
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2019
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: 3.1.1
>         Environment: windows XP vc9, linux and solaris
>            Reporter: mahalakshmi
>            Assignee: Alberto Massari
>              Labels: patch
>             Fix For: 3.2.0
>
>         Attachments: zippedfiles.zip
>
>
> I have my xsd schema using which i have created my standard xml.
> After creating the xml i fill the values for each tag in my xml. 
> I get memory allocation error when i try to traverse through the xml and set the values for each tag in my xml.
> I get allocation error when my program calls the setTextcontent() of xerces.It is crashing in DOMDocumentImpl.cpp allocate(size).(2nd if condition in that function)
> Is there any setting that needs to be done for memory allocation? How much is the maximum size of xml that xerces can parse?how do we manage the memory allocation and deallocation in DOM?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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