diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-09-02 17:52:51 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-09-02 17:52:51 +0000 |
commit | 23bf0f41ea0d0f9703be53f02742be47ce5eb2dd (patch) | |
tree | 4463a89c67fd641d267db5b7203ceb3eb13548bd /src/mem5.c | |
parent | 95e80d61af84be51f26a0cc342c997617394188d (diff) | |
download | sqlite-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/mem5.c')
-rw-r--r-- | src/mem5.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/mem5.c b/src/mem5.c index 1ce044248..6044bd8ab 100644 --- a/src/mem5.c +++ b/src/mem5.c @@ -23,7 +23,7 @@ ** This version of the memory allocation subsystem is included ** in the build only if SQLITE_ENABLE_MEMSYS5 is defined. ** -** $Id: mem5.c,v 1.13 2008/09/02 10:22:01 danielk1977 Exp $ +** $Id: mem5.c,v 1.14 2008/09/02 17:52:52 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -87,16 +87,11 @@ struct Mem5Link { */ static SQLITE_WSD struct Mem5Global { /* - ** The alarm callback and its arguments. The mem5.mutex lock will - ** be held while the callback is running. Recursive calls into - ** the memory subsystem are allowed, but no new callbacks will be - ** issued. The alarmBusy variable is set to prevent recursive - ** callbacks. + ** Memory available for allocation */ - sqlite3_int64 alarmThreshold; - void (*alarmCallback)(void*, sqlite3_int64,int); - void *alarmArg; - int alarmBusy; + int nAtom; /* Smallest possible allocation in bytes */ + int nBlock; /* Number of nAtom sized blocks in zPool */ + u8 *zPool; /* ** Mutex to control access to the memory allocation subsystem. @@ -126,13 +121,7 @@ static SQLITE_WSD struct Mem5Global { */ u8 *aCtrl; - /* - ** Memory available for allocation - */ - int nAtom; /* Smallest possible allocation in bytes */ - int nBlock; /* Number of nAtom sized blocks in zPool */ - u8 *zPool; -} mem5 = {}; +} mem5 = { 19804167 }; #define mem5 GLOBAL(struct Mem5Global, mem5) |