diff --git a/src/xercesc/dom/impl/DOMDocumentImpl.cpp b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
index df136e41bf0b29b1dde7cec2c6404c4cbad88d27..bdf084d42c5c3218e1d067e307e8df3555208340 100644
--- a/src/xercesc/dom/impl/DOMDocumentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
@@ -714,7 +714,10 @@ static const int kMaxSubAllocationSize = 4096;   // Any request for more bytes
 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));