aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-09-02 10:22:00 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-09-02 10:22:00 +0000
commit5c8f858790971cf8c9b911ca7646e7383d0d72b1 (patch)
treeb220d532caf66dd04e18e258581a338f8a179121 /src/malloc.c
parent5b775295f089ca30711c1b06368a258fcf833900 (diff)
downloadsqlite-5c8f858790971cf8c9b911ca7646e7383d0d72b1.tar.gz
sqlite-5c8f858790971cf8c9b911ca7646e7383d0d72b1.zip
Change some more global variables to work with OMIT_WSD. (CVS 5660)
FossilOrigin-Name: 46acaf58e11ebe69e4fb5f171d3ee29f056d8e68
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 5a318b113..1fc8b4f93 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -12,7 +12,7 @@
**
** Memory allocation functions used throughout sqlite.
**
-** $Id: malloc.c,v 1.38 2008/09/01 18:34:20 danielk1977 Exp $
+** $Id: malloc.c,v 1.39 2008/09/02 10:22:01 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -76,7 +76,7 @@ int sqlite3_release_memory(int n){
/*
** State information local to the memory allocation subsystem.
*/
-static struct {
+static SQLITE_WSD struct Mem0Global {
sqlite3_mutex *mutex; /* Mutex to serialize access */
/*
@@ -102,7 +102,9 @@ static struct {
/* Number of free pages for scratch and page-cache memory */
u32 nScratchFree;
u32 nPageFree;
-} mem0;
+} mem0 = {};
+
+#define mem0 GLOBAL(struct Mem0Global, mem0)
/*
** Initialize the memory allocation subsystem.