public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* mmap time complexity
@ 2021-04-15  1:17 Peng Yu
  2021-04-15 19:04 ` Godmar Back
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Yu @ 2021-04-15  1:17 UTC (permalink / raw)
  To: libc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mmap time complexity
  2021-04-15  1:17 mmap time complexity Peng Yu
@ 2021-04-15 19:04 ` Godmar Back
  0 siblings, 0 replies; 2+ messages in thread
From: Godmar Back @ 2021-04-15 19:04 UTC (permalink / raw)
  To: Peng Yu; +Cc: William Tambe via Libc-help

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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-15 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  1:17 mmap time complexity Peng Yu
2021-04-15 19:04 ` Godmar Back

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).