public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Godmar Back <godmar@gmail.com>
To: Peng Yu <pengyu.ut@gmail.com>
Cc: William Tambe via Libc-help <libc-help@sourceware.org>
Subject: Re: mmap time complexity
Date: Thu, 15 Apr 2021 15:04:21 -0400	[thread overview]
Message-ID: <CAB4+JYLO0g51RwACym_M1uQkX3USpy834dZMYd3iFpukwCyRJQ@mail.gmail.com> (raw)
In-Reply-To: <CABrM6wkwHnD_wMMne9QRGcKEK3eMmSMHz-nT1SmrGEzU-fwpQQ@mail.gmail.com>

It does not. The complexity is likely O(log n) where n is the number of
entries in `/proc/self/maps`. This number is typically less than 1000.

On Wed, Apr 14, 2021 at 10:09 PM Peng Yu via Libc-help <
libc-help@sourceware.org> wrote:

> Hi,
>
> I don't see the time complexity of mmap in its manpage. Since there is
> a length parameter, does the runtime of mmap depends on this
> parameter? Thanks.
>
> --
> Regards,
> Peng
>

      reply	other threads:[~2021-04-15 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  1:17 Peng Yu
2021-04-15 19:04 ` Godmar Back [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB4+JYLO0g51RwACym_M1uQkX3USpy834dZMYd3iFpukwCyRJQ@mail.gmail.com \
    --to=godmar@gmail.com \
    --cc=libc-help@sourceware.org \
    --cc=pengyu.ut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).