Redefine WindowTable as a fixed array
Instead of xalloc'ing it every server generation. The array is always the same size (MAXSCREENS), anyway.
This commit is contained in:
parent
e882ee7056
commit
5532d63488
|
@ -47,6 +47,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "validate.h"
|
#include "validate.h"
|
||||||
|
#include "globals.h"
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#define _MULTIBUF_SERVER_ /* don't want Xlib structures */
|
#define _MULTIBUF_SERVER_ /* don't want Xlib structures */
|
||||||
|
@ -199,8 +200,6 @@ static Bool bufChangeWindowAttributes();
|
||||||
static void bufClearToBackground();
|
static void bufClearToBackground();
|
||||||
static void bufCopyWindow();
|
static void bufCopyWindow();
|
||||||
|
|
||||||
extern WindowPtr *WindowTable;
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
bufMultibufferInit(pScreen, pMBScreen)
|
bufMultibufferInit(pScreen, pMBScreen)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
|
@ -150,7 +150,6 @@ typedef const char *string;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XEVIE
|
#ifdef XEVIE
|
||||||
extern WindowPtr *WindowTable;
|
|
||||||
extern int xevieFlag;
|
extern int xevieFlag;
|
||||||
extern int xevieClientIndex;
|
extern int xevieClientIndex;
|
||||||
extern DeviceIntPtr xeviemouse;
|
extern DeviceIntPtr xeviemouse;
|
||||||
|
|
|
@ -83,7 +83,7 @@ _X_EXPORT ClientPtr serverClient;
|
||||||
_X_EXPORT int currentMaxClients; /* current size of clients array */
|
_X_EXPORT int currentMaxClients; /* current size of clients array */
|
||||||
_X_EXPORT long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
|
_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 globalSerialNumber = 0;
|
||||||
_X_EXPORT unsigned long serverGeneration = 0;
|
_X_EXPORT unsigned long serverGeneration = 0;
|
||||||
|
|
|
@ -305,9 +305,6 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
|
SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
|
||||||
screenInfo.arraySize = MAXSCREENS;
|
screenInfo.arraySize = MAXSCREENS;
|
||||||
screenInfo.numScreens = 0;
|
screenInfo.numScreens = 0;
|
||||||
WindowTable = (WindowPtr *)xalloc(MAXSCREENS * sizeof(WindowPtr));
|
|
||||||
if (!WindowTable)
|
|
||||||
FatalError("couldn't create root window table");
|
|
||||||
|
|
||||||
InitAtoms();
|
InitAtoms();
|
||||||
InitEvents();
|
InitEvents();
|
||||||
|
@ -417,7 +414,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
|
|
||||||
config_fini();
|
config_fini();
|
||||||
|
|
||||||
memset(WindowTable, 0, MAXSCREENS * sizeof(WindowPtr));
|
memset(WindowTable, 0, sizeof(WindowTable));
|
||||||
CloseDownDevices();
|
CloseDownDevices();
|
||||||
CloseDownEvents();
|
CloseDownEvents();
|
||||||
|
|
||||||
|
@ -431,8 +428,6 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
xfree(screenInfo.screens[i]);
|
xfree(screenInfo.screens[i]);
|
||||||
screenInfo.numScreens = i;
|
screenInfo.numScreens = i;
|
||||||
}
|
}
|
||||||
xfree(WindowTable);
|
|
||||||
WindowTable = NULL;
|
|
||||||
FreeFonts();
|
FreeFonts();
|
||||||
|
|
||||||
FreeAuditTimer();
|
FreeAuditTimer();
|
||||||
|
|
|
@ -93,7 +93,6 @@ static Bool kdCaughtSignal = FALSE;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
KdOsFuncs *kdOsFuncs;
|
KdOsFuncs *kdOsFuncs;
|
||||||
extern WindowPtr *WindowTable;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
||||||
|
|
|
@ -43,13 +43,12 @@
|
||||||
#include "fboverlay.h"
|
#include "fboverlay.h"
|
||||||
#include "shadow.h"
|
#include "shadow.h"
|
||||||
#include "randrstr.h"
|
#include "randrstr.h"
|
||||||
|
#include "globals.h"
|
||||||
|
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
#include <X11/extensions/XKBstr.h>
|
#include <X11/extensions/XKBstr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern WindowPtr *WindowTable;
|
|
||||||
|
|
||||||
#define KD_DPMS_NORMAL 0
|
#define KD_DPMS_NORMAL 0
|
||||||
#define KD_DPMS_STANDBY 1
|
#define KD_DPMS_STANDBY 1
|
||||||
#define KD_DPMS_SUSPEND 2
|
#define KD_DPMS_SUSPEND 2
|
||||||
|
|
|
@ -48,6 +48,7 @@ from Kaleb S. KEITHLEY
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "vidmodeproc.h"
|
#include "vidmodeproc.h"
|
||||||
|
#include "globals.h"
|
||||||
|
|
||||||
#define DEFAULT_XF86VIDMODE_VERBOSITY 3
|
#define DEFAULT_XF86VIDMODE_VERBOSITY 3
|
||||||
|
|
||||||
|
@ -122,8 +123,6 @@ static void SXF86VidModeNotifyEvent();
|
||||||
xXF86VidModeNotifyEvent * /* to */
|
xXF86VidModeNotifyEvent * /* to */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern WindowPtr *WindowTable;
|
|
||||||
|
|
||||||
static RESTYPE EventType; /* resource type for event masks */
|
static RESTYPE EventType; /* resource type for event masks */
|
||||||
|
|
||||||
typedef struct _XF86VidModeEvent *XF86VidModeEventPtr;
|
typedef struct _XF86VidModeEvent *XF86VidModeEventPtr;
|
||||||
|
|
|
@ -20,7 +20,7 @@ extern int monitorResolution;
|
||||||
extern int defaultColorVisualClass;
|
extern int defaultColorVisualClass;
|
||||||
|
|
||||||
extern Bool Must_have_memory;
|
extern Bool Must_have_memory;
|
||||||
extern WindowPtr *WindowTable;
|
extern WindowPtr WindowTable[MAXSCREENS];
|
||||||
extern int GrabInProgress;
|
extern int GrabInProgress;
|
||||||
extern Bool noTestExtensions;
|
extern Bool noTestExtensions;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue