Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1230

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1230
    Summary: Avoid unnecessary sync points in MemoryManagerImpl
       Type: Improvement

     Status: Unassigned
   Priority: Minor

    Project: Xerces-C++
 Components: 
             Miscellaneous
   Versions:
             2.3.0

   Assignee: 
   Reporter: Michael Kopp

    Created: Thu, 17 Jun 2004 6:19 AM
    Updated: Thu, 17 Jun 2004 6:19 AM
Environment: Sun Solaris 5.8

Description:
I found that a delete(NULL) call is a sync point although it really doesn't do 
anything. That is especially anoying in the transcode functions that call deallocate 
on 'allocatedArray' even if it is null.

The fix is very simple, just change the MemoryManagerImpl::deallocate:

void MemoryManagerImpl::deallocate(void* p)
{
  if (p != NULL)
    ::operator delete(p);
}

Believe it or not but this improved my scalability a lot as this was one of the very 
few places that still did a delete call in my code.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to