From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30148 invoked by alias); 20 Dec 2007 19:53:19 -0000 Received: (qmail 30123 invoked by uid 48); 20 Dec 2007 19:53:03 -0000 Date: Thu, 20 Dec 2007 19:53:00 -0000 Message-ID: <20071220195303.30122.qmail@sourceware.org> From: "roland at gnu dot org" To: glibc-bugs@sources.redhat.com In-Reply-To: <20071220133012.5514.ebb9@byu.net> References: <20071220133012.5514.ebb9@byu.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/5514] memmem is O(n^2), but should be O(n) X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00133.txt.bz2 ------- Additional Comments From roland at gnu dot org 2007-12-20 19:53 ------- For libc, it is not really feasible to have functions like memmem and strstr calling malloc. Such functions have always been simple reentrant code before, and we can't go introducing locking and so forth there. An implementation that needs a varying amount of memory is only OK if the amount required is small enough to use alloca (we have __libc_use_alloca to provide a size limit test). If you would like to supply such an implementation for libc, post the patch to libc-alpha. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |SUSPENDED http://sourceware.org/bugzilla/show_bug.cgi?id=5514 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.