2
0
Эх сурвалжийг харах

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

git-svn-id: trunk@13548 -
sergei 16 жил өмнө
parent
commit
d6244f680a

+ 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);