diff options
author | Matthew Hoops | 2011-05-11 00:30:02 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-05-11 00:30:28 -0400 |
commit | a1d41da096c0bcf502a85919cb1cb1ee471719c5 (patch) | |
tree | 8c51419daa486f1d4833757db4715dadab6c3497 /engines/toon/path.cpp | |
parent | accb0c2a5d0c9e7b353cda4b74f511a498ed8073 (diff) | |
parent | 33c3e19cea2a08fbf26ecbe940763e8ee1c37d28 (diff) | |
download | scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.gz scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.bz2 scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.zip |
Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
audio/decoders/qdm2.h
common/util.cpp
engines/groovie/music.cpp
engines/groovie/resource.h
video/qt_decoder.cpp
video/qt_decoder.h
Diffstat (limited to 'engines/toon/path.cpp')
-rw-r--r-- | engines/toon/path.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index e0cdf87502..26355863f6 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -23,6 +23,8 @@ * */ +#include "common/debug.h" + #include "toon/path.h" namespace Toon { @@ -407,7 +409,11 @@ void PathFinding::init(Picture *mask) { _height = mask->getHeight(); _currentMask = mask; _heap->unload(); - _heap->init(_width * _height); + // In order to reduce memory fragmentation on small devices, we use the maximum + // possible size here which is TOON_BACKBUFFER_WIDTH. Even though this is + // 1280 as opposed to the possible 640, it actually helps memory allocation on + // those devices. + _heap->init(TOON_BACKBUFFER_WIDTH * _height); // should really be _width delete[] _gridTemp; _gridTemp = new int32[_width*_height]; } |