Prev Next OpenBSD and Rthreads Slide #22

Syscall API: mquery()

          base = 0
          foreach segment {
             ret = mquery(base + segment->offset, segment->size)
             if (base == 0)
                base = ret;
             else if (ret == MAP_FAILED)
                /* get hint, reset base to match */
                goto begin;
          }


EuroBSDCon 2012 Copyright © 2012 Philip Guenther