Skip to content

Commit

Permalink
Merge pull request #632 from NathanFrench/realign_struct_event
Browse files Browse the repository at this point in the history
Reorder fields in struct event for memory efficiency
  • Loading branch information
NathanFrench committed May 2, 2018
2 parents 23c2914 + 1af8017 commit 1619cc3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/event2/event_struct.h
Expand Up @@ -130,6 +130,9 @@ struct event {
} ev_timeout_pos;
evutil_socket_t ev_fd;

short ev_events;
short ev_res; /* result passed to event callback */

struct event_base *ev_base;

union {
Expand All @@ -148,8 +151,7 @@ struct event {
} ev_signal;
} ev_;

short ev_events;
short ev_res; /* result passed to event callback */

struct timeval ev_timeout;
};

Expand Down

0 comments on commit 1619cc3

Please sign in to comment.