From 5532d63488ec45953ff7f925cfb4f87adb3b04a0 Mon Sep 17 00:00:00 2001 From: Tomas Carnecky Date: Mon, 4 Aug 2008 23:06:08 +0300 Subject: Redefine WindowTable as a fixed array Instead of xalloc'ing it every server generation. The array is always the same size (MAXSCREENS), anyway. --- dix/main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'dix/main.c') 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(); -- cgit v1.2.3