From patchwork Mon Aug 18 08:00:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 380726 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9747114010C for ; Mon, 18 Aug 2014 18:02:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B77B54B5FA; Mon, 18 Aug 2014 10:01:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mYGiTnhAoS0z; Mon, 18 Aug 2014 10:01:59 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AF8B94B601; Mon, 18 Aug 2014 10:01:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60F2E4B5E4 for ; Mon, 18 Aug 2014 10:01:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ti2H3lM7x75Z for ; Mon, 18 Aug 2014 10:01:31 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by theia.denx.de (Postfix) with ESMTPS id 3A0014A02F for ; Mon, 18 Aug 2014 10:01:19 +0200 (CEST) Received: by mail-wg0-f48.google.com with SMTP id x13so4567737wgg.19 for ; Mon, 18 Aug 2014 01:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=89JAFr3u7KEE/fijh26x7mFedrSUNO0t66Z5e4H9NkU=; b=X7Wjo6tVhY2L0+/xpQKjy1kn/VEOicI8ajfqfWPKjUgDxW0G0a8RTfqZVS6K4V5vLM +615Uulp9oK2LQImsh2v+QFvHRYldJAK3aEpbNHZd0Gp5fnnZ5Y1rU/SPfP6hrsRkvjg Ex76ySQyceJmwdZQB/yUYXatKaUkJpBrP5cdvDivSVujx13cuI02EGuwpSV0FiknfSID Q4iZRMvOHs8efSJHKQpJnaff5RuiZOjud7S15u7PxVtmPny9RAGHH9kU3rrnxTygV4s1 gHS7zNvYI4riYiBXEIeeD0IBAb2tllnQyW9DAAkT6Z4RKRxs1Xdk8sfE9FrWorzEdBwh 6kJg== X-Received: by 10.194.184.230 with SMTP id ex6mr39393130wjc.83.1408348879169; Mon, 18 Aug 2014 01:01:19 -0700 (PDT) Received: from localhost (port-90705.pppoe.wtnet.de. [84.46.66.196]) by mx.google.com with ESMTPSA id 19sm40345380wjz.3.2014.08.18.01.01.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Aug 2014 01:01:17 -0700 (PDT) From: Thierry Reding To: Albert Aribaud , Joe Hershberger Date: Mon, 18 Aug 2014 10:00:46 +0200 Message-Id: <1408348852-30894-4-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1408348852-30894-1-git-send-email-thierry.reding@gmail.com> References: <1408348852-30894-1-git-send-email-thierry.reding@gmail.com> Cc: u-boot@lists.denx.de, Stephen Warren , Tom Warren Subject: [U-Boot] [PATCH 3/9] malloc: Output region when debugging X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Thierry Reding When DEBUG is set, output memory region used for malloc(). Signed-off-by: Thierry Reding --- common/dlmalloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index f9873393c183..3d6391e60acf 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1533,6 +1533,9 @@ void mem_malloc_init(ulong start, ulong size) mem_malloc_end = start + size; mem_malloc_brk = start; + debug("using memory %#lx-%#lx for malloc()\n", mem_malloc_start, + mem_malloc_end); + memset((void *)mem_malloc_start, 0, size); malloc_bin_reloc();