You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/07/16 14:27:12 UTC
cvs commit: xml-xerces/c/src/xercesc/dom/impl DOMDocumentImpl.cpp
tng 2002/07/16 05:27:12
Modified: c/src/xercesc/dom/impl DOMDocumentImpl.cpp
Log:
[Bug 10648] DOMDocumentImpl misaligned allocations on machines with a 64 bits 'long' type.
Revision Changes Path
1.12 +5 -2 xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.cpp
Index: DOMDocumentImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- DOMDocumentImpl.cpp 15 Jul 2002 19:29:53 -0000 1.11
+++ DOMDocumentImpl.cpp 16 Jul 2002 12:27:12 -0000 1.12
@@ -714,7 +714,10 @@
void * DOMDocumentImpl::allocate(size_t amount)
{
- size_t sizeOfPointer = sizeof(void *);
+// size_t sizeOfPointer = sizeof(void *);
+// some MIPS or IA64 machines may misallign if the class has a long data type member
+// see Bug 10648 for details
+ size_t sizeOfPointer = sizeof(long);
if (amount%sizeOfPointer!=0)
amount = amount + (sizeOfPointer - (amount % sizeOfPointer));
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org