Skip to content

Instantly share code, notes, and snippets.

@saghul
Created September 21, 2016 22:27
Show Gist options
  • Save saghul/168f7b41572bdb2d2cb7953ccb5a4bbb to your computer and use it in GitHub Desktop.
Save saghul/168f7b41572bdb2d2cb7953ccb5a4bbb to your computer and use it in GitHub Desktop.
struct uv_loop_s {
void * data; /* 0 8 */
unsigned int active_handles; /* 8 4 */
/* XXX 4 bytes hole, try to pack */
void * handle_queue[2]; /* 16 16 */
void * active_reqs[2]; /* 32 16 */
unsigned int stop_flag; /* 48 4 */
/* XXX 4 bytes hole, try to pack */
long unsigned int flags; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
int backend_fd; /* 64 4 */
/* XXX 4 bytes hole, try to pack */
void * pending_queue[2]; /* 72 16 */
void * watcher_queue[2]; /* 88 16 */
uv__io_t * * watchers; /* 104 8 */
unsigned int nwatchers; /* 112 4 */
unsigned int nfds; /* 116 4 */
void * wq[2]; /* 120 16 */
/* --- cacheline 2 boundary (128 bytes) was 8 bytes ago --- */
uv_mutex_t wq_mutex; /* 136 40 */
uv_async_t wq_async; /* 176 128 */
/* --- cacheline 4 boundary (256 bytes) was 48 bytes ago --- */
uv_rwlock_t cloexec_lock; /* 304 56 */
/* --- cacheline 5 boundary (320 bytes) was 40 bytes ago --- */
uv_handle_t * closing_handles; /* 360 8 */
void * process_handles[2]; /* 368 16 */
/* --- cacheline 6 boundary (384 bytes) --- */
void * prepare_handles[2]; /* 384 16 */
void * check_handles[2]; /* 400 16 */
void * idle_handles[2]; /* 416 16 */
void * async_handles[2]; /* 432 16 */
/* --- cacheline 7 boundary (448 bytes) --- */
struct uv__async async_watcher; /* 448 72 */
/* --- cacheline 8 boundary (512 bytes) was 8 bytes ago --- */
struct {
void * min; /* 520 8 */
unsigned int nelts; /* 528 4 */
} timer_heap; /* 520 16 */
uint64_t timer_counter; /* 536 8 */
uint64_t time; /* 544 8 */
int signal_pipefd[2]; /* 552 8 */
uv__io_t signal_io_watcher; /* 560 56 */
/* --- cacheline 9 boundary (576 bytes) was 40 bytes ago --- */
uv_signal_t child_watcher; /* 616 152 */
/* --- cacheline 12 boundary (768 bytes) --- */
int emfile_fd; /* 768 4 */
/* XXX 4 bytes hole, try to pack */
uv__io_t inotify_read_watcher; /* 776 56 */
/* --- cacheline 13 boundary (832 bytes) --- */
void * inotify_watchers; /* 832 8 */
int inotify_fd; /* 840 4 */
/* size: 848, cachelines: 14, members: 33 */
/* sum members: 828, holes: 4, sum holes: 16 */
/* padding: 4 */
/* last cacheline: 16 bytes */
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment