瀏覽代碼

* InstanceSize must be rounded up to sizeof(Pointer) everywhere, fixes #14348

git-svn-id: trunk@13548 -
sergei 16 年之前
父節點
當前提交
d6244f680a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/fcl-xml/src/dom.pp

+ 1 - 1
packages/fcl-xml/src/dom.pp

@@ -2060,7 +2060,7 @@ constructor TDOMDocument.Create;
 begin
   inherited Create(nil);
   FOwnerDocument := Self;
-  FMaxPoolSize := TDOMAttr.InstanceSize + sizeof(Pointer);
+  FMaxPoolSize := (TDOMAttr.InstanceSize + sizeof(Pointer)-1) and not (sizeof(Pointer)-1) + sizeof(Pointer);
   FPools := AllocMem(FMaxPoolSize);
   FNames := THashTable.Create(256, True);
   SetLength(FNamespaces, 3);