From owner-freebsd-arch@FreeBSD.ORG Thu Jan 17 21:17:28 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC4DD4ED for ; Thu, 17 Jan 2013 21:17:28 +0000 (UTC) (envelope-from stevek@juniper.net) Received: from exprod7og125.obsmtp.com (exprod7og125.obsmtp.com [64.18.2.28]) by mx1.freebsd.org (Postfix) with ESMTP id 8831A16A for ; Thu, 17 Jan 2013 21:17:28 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob125.postini.com ([64.18.6.12]) with SMTP ID DSNKUPhqYroa7jwhj56BtNd2/2Etl3YxyoVG@postini.com; Thu, 17 Jan 2013 13:17:28 PST Received: from stevek-ubuntu (172.25.4.212) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server id 8.3.213.0; Thu, 17 Jan 2013 13:13:14 -0800 Date: Thu, 17 Jan 2013 16:13:11 -0500 From: Steve Kiernan To: Subject: [JNPR] Proposal to add weak symbols for malloc, realloc, and free to libc Message-ID: <20130117161311.4c15c7c4@stevek-ubuntu> Organization: Juniper Networks Inc. X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2013 21:17:28 -0000 When libc was changed to use jemalloc, the weak symbols for malloc, realloc, and free ended up being removed. This makes it a bit difficult for an application to replace (or augment) the malloc implementation. This proposal is to add back the weak symbols similar to how they existed in libc prior to jemalloc introduction. See the following patch for the changes: http://people.freebsd.org/~marcel/Juniper/weak-malloc.diff I'm not sure if the the symbols are in the proper place in the Symbol.map file and would welcome comments. -- Stephen J. Kiernan Juniper Networks, Inc. stevek_at_juniper.net