[Scummvm-cvs-logs] SF.net SVN: scummvm:[34644] scummvm/trunk/common/str.h
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Sep 24 22:35:32 CEST 2008
Revision: 34644
http://scummvm.svn.sourceforge.net/scummvm/?rev=34644&view=rev
Author: fingolfin
Date: 2008-09-24 20:35:31 +0000 (Wed, 24 Sep 2008)
Log Message:
-----------
Changed builtin Common::String capacity to 24 (on 32 bit systems), to make sizeof(String) 32; reduces overall memory req by 200k on my system; overall # of mallocs after this + the refcount memory pool change is almost unchanged
Modified Paths:
--------------
scummvm/trunk/common/str.h
Modified: scummvm/trunk/common/str.h
===================================================================
--- scummvm/trunk/common/str.h 2008-09-24 20:31:14 UTC (rev 34643)
+++ scummvm/trunk/common/str.h 2008-09-24 20:35:31 UTC (rev 34644)
@@ -54,7 +54,7 @@
* than 8 makes no sense, since that's the size of member _extern
* (on 32 bit machines; 12 bytes on systems with 64bit pointers).
*/
- static const uint32 _builtinCapacity = 32;
+ static const uint32 _builtinCapacity = 32 - sizeof(uint32) - sizeof(char*);
/**
* Length of the string. Stored to avoid having to call strlen
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list