Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Lightweight points

Phil "RzR" Coval edited this page Jul 27, 2017 · 4 revisions

Lightweight points of libtuv from libuv for IoT

  • heap-inl.h: inlining to normal function, this may slow 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