Skip to content
SaeHie Park edited this page Jul 20, 2015 · 3 revisions

Lightweight points of libtuv from libuv for IoT

  • heap-inl.h: inlining to normal function, this may speed down but can reduce code size
  • remove async nature and run in blocking mode
    • with not much concurrent connection to handle we may run in sync mode
    • maybe can remove threadpool, async, io, threadpool, thread
  • events array size in uv__io_poll to reduce stack size
    • size is 1024 for linux which becomes 12KB or 16KB in linux, but can be relatively quite large for embedded systems
void uv__io_poll(uv_loop_t* loop, int timeout) {
  static int no_epoll_pwait;
  static int no_epoll_wait;
  struct uv__epoll_event events[TUV_POLL_EVENTS_SIZE];
  struct uv__epoll_event* pe;
  struct uv__epoll_event e;
  • and...
Clone this wiki locally