diff options
author | Tomas Carnecky <tom@dbservice.com> | 2008-08-04 23:06:08 +0300 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2008-08-05 01:17:32 +0300 |
commit | 5532d63488ec45953ff7f925cfb4f87adb3b04a0 (patch) | |
tree | 13999b71862b50fcb6ace956f49ae7002ecfad56 /dix | |
parent | e882ee7056f370e0619d137b4ec3973ecb4e3479 (diff) |
Redefine WindowTable as a fixed array
Instead of xalloc'ing it every server generation. The array is always
the same size (MAXSCREENS), anyway.
Diffstat (limited to 'dix')
-rw-r--r-- | dix/events.c | 1 | ||||
-rw-r--r-- | dix/globals.c | 2 | ||||
-rw-r--r-- | dix/main.c | 7 |
3 files changed, 2 insertions, 8 deletions
diff --git a/dix/events.c b/dix/events.c index d6b3ecb1f..f04433b65 100644 --- a/dix/events.c +++ b/dix/events.c @@ -150,7 +150,6 @@ typedef const char *string; #endif #ifdef XEVIE -extern WindowPtr *WindowTable; extern int xevieFlag; extern int xevieClientIndex; extern DeviceIntPtr xeviemouse; diff --git a/dix/globals.c b/dix/globals.c index 210c7849c..d3dd33119 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -83,7 +83,7 @@ _X_EXPORT ClientPtr serverClient; _X_EXPORT int currentMaxClients; /* current size of clients array */ _X_EXPORT long maxBigRequestSize = MAX_BIG_REQUEST_SIZE; -_X_EXPORT WindowPtr *WindowTable; +_X_EXPORT WindowPtr WindowTable[MAXSCREENS]; _X_EXPORT unsigned long globalSerialNumber = 0; _X_EXPORT unsigned long serverGeneration = 0; diff --git a/dix/main.c b/dix/main.c index ab6ca5728..c34bc8a3c 100644 --- a/dix/main.c +++ b/dix/main.c @@ -305,9 +305,6 @@ int main(int argc, char *argv[], char *envp[]) SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]); screenInfo.arraySize = MAXSCREENS; screenInfo.numScreens = 0; - WindowTable = (WindowPtr *)xalloc(MAXSCREENS * sizeof(WindowPtr)); - if (!WindowTable) - FatalError("couldn't create root window table"); InitAtoms(); InitEvents(); @@ -417,7 +414,7 @@ int main(int argc, char *argv[], char *envp[]) config_fini(); - memset(WindowTable, 0, MAXSCREENS * sizeof(WindowPtr)); + memset(WindowTable, 0, sizeof(WindowTable)); CloseDownDevices(); CloseDownEvents(); @@ -431,8 +428,6 @@ int main(int argc, char *argv[], char *envp[]) xfree(screenInfo.screens[i]); screenInfo.numScreens = i; } - xfree(WindowTable); - WindowTable = NULL; FreeFonts(); FreeAuditTimer(); |