dix: Repack ClientRec
Pick smaller types where possible, including bitfielding some Bools and small enums, then shuffle the result to be hole-free. 192 -> 128 bytes on LP64, 144 -> 96 bytes on ILP32. Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
ff8e3ad807
commit
31bf81772e
|
@ -56,8 +56,7 @@ ReplyNotSwappd(ClientPtr /* pClient */ ,
|
||||||
void * /* pbuf */ ) _X_NORETURN;
|
void * /* pbuf */ ) _X_NORETURN;
|
||||||
|
|
||||||
typedef enum { ClientStateInitial,
|
typedef enum { ClientStateInitial,
|
||||||
/* 1 is unused now, was ClientStateAuthenticating */
|
ClientStateRunning,
|
||||||
ClientStateRunning = 2,
|
|
||||||
ClientStateRetained,
|
ClientStateRetained,
|
||||||
ClientStateGone
|
ClientStateGone
|
||||||
} ClientState;
|
} ClientState;
|
||||||
|
@ -86,27 +85,29 @@ typedef struct _Window *SaveSetElt;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _Client {
|
typedef struct _Client {
|
||||||
int index;
|
|
||||||
Mask clientAsMask;
|
|
||||||
pointer requestBuffer;
|
pointer requestBuffer;
|
||||||
pointer osPrivate; /* for OS layer, including scheduler */
|
pointer osPrivate; /* for OS layer, including scheduler */
|
||||||
Bool swapped;
|
Mask clientAsMask;
|
||||||
Bool local;
|
short index;
|
||||||
|
unsigned char majorOp, minorOp;
|
||||||
|
int swapped:1;
|
||||||
|
int local:1;
|
||||||
|
int big_requests:1; /* supports large requests */
|
||||||
|
int clientGone:1;
|
||||||
|
int closeDownMode:2;
|
||||||
|
int clientState:2;
|
||||||
|
char smart_priority;
|
||||||
|
short noClientException; /* this client died or needs to be killed */
|
||||||
|
int priority;
|
||||||
ReplySwapPtr pSwapReplyFunc;
|
ReplySwapPtr pSwapReplyFunc;
|
||||||
XID errorValue;
|
XID errorValue;
|
||||||
int sequence;
|
int sequence;
|
||||||
int closeDownMode;
|
|
||||||
int clientGone;
|
|
||||||
int noClientException; /* this client died or needs to be
|
|
||||||
* killed */
|
|
||||||
int ignoreCount; /* count for Attend/IgnoreClient */
|
int ignoreCount; /* count for Attend/IgnoreClient */
|
||||||
SaveSetElt *saveSet;
|
|
||||||
int numSaved;
|
int numSaved;
|
||||||
|
SaveSetElt *saveSet;
|
||||||
int (**requestVector) (ClientPtr /* pClient */ );
|
int (**requestVector) (ClientPtr /* pClient */ );
|
||||||
CARD32 req_len; /* length of current request */
|
CARD32 req_len; /* length of current request */
|
||||||
Bool big_requests; /* supports large requests */
|
unsigned int replyBytesRemaining;
|
||||||
int priority;
|
|
||||||
ClientState clientState;
|
|
||||||
PrivateRec *devPrivates;
|
PrivateRec *devPrivates;
|
||||||
unsigned short xkbClientFlags;
|
unsigned short xkbClientFlags;
|
||||||
unsigned short mapNotifyMask;
|
unsigned short mapNotifyMask;
|
||||||
|
@ -114,15 +115,12 @@ typedef struct _Client {
|
||||||
unsigned short vMajor, vMinor;
|
unsigned short vMajor, vMinor;
|
||||||
KeyCode minKC, maxKC;
|
KeyCode minKC, maxKC;
|
||||||
|
|
||||||
unsigned long replyBytesRemaining;
|
int smart_start_tick;
|
||||||
int smart_priority;
|
int smart_stop_tick;
|
||||||
long smart_start_tick;
|
int smart_check_tick;
|
||||||
long smart_stop_tick;
|
|
||||||
long smart_check_tick;
|
|
||||||
|
|
||||||
DeviceIntPtr clientPtr;
|
DeviceIntPtr clientPtr;
|
||||||
ClientIdPtr clientIds;
|
ClientIdPtr clientIds;
|
||||||
unsigned short majorOp, minorOp;
|
|
||||||
} ClientRec;
|
} ClientRec;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue