From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by sourceware.org (Postfix) with ESMTPS id 8D8A1383B42F for ; Thu, 15 Apr 2021 19:04:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8D8A1383B42F Received: by mail-yb1-xb29.google.com with SMTP id n12so27321589ybf.8 for ; Thu, 15 Apr 2021 12:04:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f8ytnZZKbZV26LLZ3sPn70wfoDeGDZyAzQc7FJ7WSYw=; b=c7J5ITB7yFAxj6f9wDnwp7pIk3duyI1lr3GbBqjGF0tFApamH7bMRieZI/fBLlpTIz yrkC6hOchxb0NHPeBnDbHxFBSs7votHNuaPepUmWVnRennR2tEce6Owtk3r9MoulpI7X NlX/mmJOIuZQpgZxoFvR7t0ROfxP8eXo7nZYZqpBhJFKtks0xmQS1TMUU7ihi8UEKZxl DHhlpyiN4+ZVrk18XJyDXR6fjcMg9p8m4EX0GRReVYCLi/Z0eU3BPdVqvePnyLKzleXG gmuY3Nxibpl/NkbJDZsfBniUwvqONtKBbluSuVBCOGN/p+oWSv08L0uIk2KqJtrrRTBJ gafA== X-Gm-Message-State: AOAM532EzD8fW9tqyal7g+S5+Tf9CiqAQ7mCk2N9kkTCFfSeJVJ7+Xjp iQ4d4onwZF9rf40abfCZn4JGXyTbN1WzE5UyvDg= X-Google-Smtp-Source: ABdhPJwTKTOYlZ9bjivjCYH9XhSQ0lJxcHal7b8KslBCOAnBk8rfQp9d+OZ53Axr38rvZXzhsM3j8DQJ7At8QjISH6Q= X-Received: by 2002:a25:7c47:: with SMTP id x68mr6664056ybc.358.1618513472098; Thu, 15 Apr 2021 12:04:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Godmar Back Date: Thu, 15 Apr 2021 15:04:21 -0400 Message-ID: Subject: Re: mmap time complexity To: Peng Yu Cc: William Tambe via Libc-help X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 19:04:34 -0000 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 >