aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-01-05 16:49:59 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-01-05 16:49:59 +0000
commitdb50b9d874e75e0dd46a4844936b732a40e530ff (patch)
treef72f313503aab8ca563bbbb79cddb4692ead3f00 /code
parent57a98f2182b9b8f2355bcc624d57f7292035c1d8 (diff)
downloadioquake3-aero-db50b9d874e75e0dd46a4844936b732a40e530ff.tar.gz
ioquake3-aero-db50b9d874e75e0dd46a4844936b732a40e530ff.zip
* Up the defaults for zone and hunk memory since some mods (UT) have large
memory requirements that will have increased versus 1.32b due to some of the alignment fixes git-svn-id: svn://svn.icculus.org/quake3/trunk@461 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/qcommon/common.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/code/qcommon/common.c b/code/qcommon/common.c
index 74f75ea..c0baaf5 100644
--- a/code/qcommon/common.c
+++ b/code/qcommon/common.c
@@ -37,14 +37,12 @@ int demo_protocols[] =
#define MAX_NUM_ARGVS 50
#define MIN_DEDICATED_COMHUNKMEGS 1
-#define MIN_COMHUNKMEGS 56
-#ifdef MACOS_X
-#define DEF_COMHUNKMEGS "64"
-#define DEF_COMZONEMEGS "24"
-#else
-#define DEF_COMHUNKMEGS "56"
-#define DEF_COMZONEMEGS "16"
-#endif
+#define MIN_COMHUNKMEGS 56
+#define DEF_COMHUNKMEGS 64
+#define DEF_COMZONEMEGS 24
+#define STRING(x) #x
+#define DEF_COMHUNKMEGS_S STRING(DEF_COMHUNKMEGS)
+#define DEF_COMZONEMEGS_S STRING(DEF_COMZONEMEGS)
int com_argc;
char *com_argv[MAX_NUM_ARGVS+1];
@@ -414,7 +412,7 @@ Com_StartupVariable
Searches for command line parameters that are set commands.
If match is not NULL, only that cvar will be looked for.
That is necessary because cddir and basedir need to be set
-before the filesystem is started, but all other sets shouls
+before the filesystem is started, but all other sets should
be after execing the config and default.
===============
*/
@@ -1385,11 +1383,16 @@ void Com_InitSmallZoneMemory( void ) {
void Com_InitZoneMemory( void ) {
cvar_t *cv;
+
+ //FIXME: 05/01/06 com_zoneMegs is useless right now as neither q3config.cfg nor
+ // Com_StartupVariable have been executed by this point. The net result is that
+ // s_zoneTotal will always be set to the default value.
+
// allocate the random block zone
- cv = Cvar_Get( "com_zoneMegs", DEF_COMZONEMEGS, CVAR_LATCH | CVAR_ARCHIVE );
+ cv = Cvar_Get( "com_zoneMegs", DEF_COMZONEMEGS_S, CVAR_LATCH | CVAR_ARCHIVE );
- if ( cv->integer < 20 ) {
- s_zoneTotal = 1024 * 1024 * 16;
+ if ( cv->integer < DEF_COMZONEMEGS ) {
+ s_zoneTotal = 1024 * 1024 * DEF_COMZONEMEGS;
} else {
s_zoneTotal = cv->integer * 1024 * 1024;
}
@@ -1500,7 +1503,7 @@ void Com_InitHunkMemory( void ) {
}
// allocate the stack based hunk allocator
- cv = Cvar_Get( "com_hunkMegs", DEF_COMHUNKMEGS, CVAR_LATCH | CVAR_ARCHIVE );
+ cv = Cvar_Get( "com_hunkMegs", DEF_COMHUNKMEGS_S, CVAR_LATCH | CVAR_ARCHIVE );
// if we are not dedicated min allocation is 56, otherwise min is 1
if (com_dedicated && com_dedicated->integer) {