Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10798) Freeciv2 Beta2 - probably corrupted savegames
Home

[Freeciv-Dev] (PR#10798) Freeciv2 Beta2 - probably corrupted savegames

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: libzur@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#10798) Freeciv2 Beta2 - probably corrupted savegames
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Sun, 31 Oct 2004 03:14:54 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10798 >

Here's the simplest solution - increase the upper limit to 30MB in mem.c

Can anyone check why does the hash code need so much memory? The files
are only 10MB after ungzipping.

The files are available at:
http://tokai.liberouter.org:8080/personal/freeciv2/
--
mateusz
Index: utility/mem.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/mem.c,v
retrieving revision 1.9
diff -u -r1.9 mem.c
--- utility/mem.c       24 Jul 2004 03:23:59 -0000      1.9
+++ utility/mem.c       31 Oct 2004 11:12:52 -0000
@@ -48,11 +48,11 @@
 static void sanity_check_size(size_t size, const char *called_as,
                              int line, const char *file)
 {
-  /* We're not allowed to allocate more than 20 Mb - the program will exit
+  /* We're not allowed to allocate more than 30 Mb - the program will exit
    * if someone tries.  This is a sanity measure since some parts of the code
    * could try to allocate unboundedly large amounts of memory if given the
    * wrong input. */
-  const size_t max_alloc_size = 20 * (1 << 20);
+  const size_t max_alloc_size = 30 * (1 << 20);
 
   if (size == 0) {
     freelog(LOG_VERBOSE, "Warning: %s with size %lu at line %d of %s",

[Prev in Thread] Current Thread [Next in Thread]