Fix an obvious typo in the pool allocation sizing.
authorPetr Nejedly <pnejedly@blackberry.com>
Wed, 26 Jun 2013 21:36:54 +0000 (14:36 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 29 Jun 2013 15:40:41 +0000 (17:40 +0200)
commita1f4211ddea00c051647bda9a7fcd841f946dea8
tree9ef2d041a36372c3be8c28e1790ada4546ed43a7
parentb1eb8d37c505cba6692dd35c6cb84767a0045f8f
Fix an obvious typo in the pool allocation sizing.

The pooled allocator in V4 preallocates the memory in a reasonably
sized chunks to limit the OS overhead of the allocations.
The chunks are supposed to be exponentially bigger, but the chunk sizes
should not depend on the size of the original allocation request.
Before the fix, the first allocation in every bucket basically
preallocated 64k slots of given size instead of 64k bytes, thus even
a trivial application ended up with 28MB of such heap.
After the fix, the same application is happy with <400kB
of this managed heap.

Change-Id: I1deae95bb6f45b8c67afe71d3a560b787357b31b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/v4/qv4mm.cpp