Win64 patch 3/6 (resend)
Ge van Geldorp
ge at gse.nl
Tue Jul 25 09:12:11 CDT 2006
> From: Alexandre Julliard [mailto:julliard at winehq.org]
>
> The best way would be to fix the few offending requests so
> that we don't need to make every single request larger.
Not sure I understand what you mean. If I look at struct
send_message_request, it's current 64-bit layout is:
struct send_message_request
{
struct request_header
{
int req; /* 4 bytes */
/* 4 bytes padding */
size_t request_size; /* 8 bytes */
size_t reply_size; /* 8 bytes */
} __header;
thread_id_t id; /* 4 bytes */
int type; /* 4 bytes */
int flags; /* 4 bytes */
/* 4 bytes padding */
user_handle_t win; /* 8 bytes */
unsigned int msg; /* 4 bytes */
/* 4 bytes padding */
unsigned long wparam; /* 8 bytes */
unsigned long lparam; /* 8 bytes */
int x; /* 4 bytes */
int y; /* 4 bytes */
unsigned int time; /* 4 bytes */
unsigned int info; /* 4 bytes */
int timeout; /* 4 bytes */
/* 4 bytes padding */
void* callback; /* 8 bytes */
/* VARARG(data,bytes); */
};
Total 104 bytes.
Even if we rearrange the fields so minimum padding is required:
struct send_message_request
{
struct request_header
{
int req; /* 4 bytes */
/* 4 bytes padding */
size_t request_size; /* 8 bytes */
size_t reply_size; /* 8 bytes */
} __header;
user_handle_t win; /* 8 bytes */
unsigned long wparam; /* 8 bytes */
unsigned long lparam; /* 8 bytes */
void* callback; /* 8 bytes */
thread_id_t id; /* 4 bytes */
int type; /* 4 bytes */
int flags; /* 4 bytes */
unsigned int msg; /* 4 bytes */
int x; /* 4 bytes */
int y; /* 4 bytes */
unsigned int time; /* 4 bytes */
unsigned int info; /* 4 bytes */
int timeout; /* 4 bytes */
/* 4 bytes padding */
/* VARARG(data,bytes); */
};
Total bytes required: 96.
The current request_max_size is
struct request_max_size
{
int pad[16];
};
which is only 64 bytes. I'm not sure what you want changed in
request_send_message to make it fit in 64 bytes?
Ge van Geldorp.
More information about the wine-devel
mailing list