aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-09-02 17:52:51 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-09-02 17:52:51 +0000
commit23bf0f41ea0d0f9703be53f02742be47ce5eb2dd (patch)
tree4463a89c67fd641d267db5b7203ceb3eb13548bd /src/malloc.c
parent95e80d61af84be51f26a0cc342c997617394188d (diff)
downloadsqlite-23bf0f41ea0d0f9703be53f02742be47ce5eb2dd.tar.gz
sqlite-23bf0f41ea0d0f9703be53f02742be47ce5eb2dd.zip
Explicitly initialize at least the first field of every struct. This is to work around compilers that don't like the syntax "struct XXX { ... } yyy = {};". (CVS 5666)
FossilOrigin-Name: 88bfdc87471e65ac5a262a794b8cdf3e563eb327
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 1fc8b4f93..61e1c1dbf 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -12,7 +12,7 @@
**
** Memory allocation functions used throughout sqlite.
**
-** $Id: malloc.c,v 1.39 2008/09/02 10:22:01 danielk1977 Exp $
+** $Id: malloc.c,v 1.40 2008/09/02 17:52:52 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -77,6 +77,10 @@ int sqlite3_release_memory(int n){
** State information local to the memory allocation subsystem.
*/
static SQLITE_WSD struct Mem0Global {
+ /* Number of free pages for scratch and page-cache memory */
+ u32 nScratchFree;
+ u32 nPageFree;
+
sqlite3_mutex *mutex; /* Mutex to serialize access */
/*
@@ -98,11 +102,7 @@ static SQLITE_WSD struct Mem0Global {
*/
u32 *aScratchFree;
u32 *aPageFree;
-
- /* Number of free pages for scratch and page-cache memory */
- u32 nScratchFree;
- u32 nPageFree;
-} mem0 = {};
+} mem0 = { 62560955 };
#define mem0 GLOBAL(struct Mem0Global, mem0)