From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13289 invoked by alias); 15 Jun 2010 10:10:26 -0000 Received: (qmail 13273 invoked by uid 22791); 15 Jun 2010 10:10:25 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_05 X-Spam-Check-By: sourceware.org Received: from cpanel5.proisp.no (HELO cpanel5.proisp.no) (209.85.100.29) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Jun 2010 10:10:21 +0000 Received: from mail-bw0-f49.google.com ([209.85.214.49]:49671) by cpanel5.proisp.no with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.69) (envelope-from ) id 1OOT63-0001pt-3x for ecos-patches@ecos.sourceware.org; Tue, 15 Jun 2010 12:10:19 +0200 Received: by bwz11 with SMTP id 11so2570322bwz.36 for ; Tue, 15 Jun 2010 03:10:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.83.221 with SMTP id g29mr5286470bkl.124.1276596616334; Tue, 15 Jun 2010 03:10:16 -0700 (PDT) Received: by 10.204.101.144 with HTTP; Tue, 15 Jun 2010 03:10:16 -0700 (PDT) Date: Tue, 15 Jun 2010 10:10:00 -0000 Message-ID: Subject: dlmalloc assert check for the size of the arena From: Edgar Grimberg To: ecos-patches@ecos.sourceware.org Content-Type: multipart/mixed; boundary=0016e6dab55ed68e0604890ecf44 X-IsSubscribed: yes Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2010-06/txt/msg00013.txt.bz2 --0016e6dab55ed68e0604890ecf44 Content-Type: text/plain; charset=ISO-8859-1 Content-length: 452 Hi, When modifying the linker script to adjust the location of RAM, it is easy to forget to change the size of the heap in the eCos memory layout file. This value is being passed to the memory allocator. If the size if negative, the dlmalloc doesn't complain. The attached patch checks the size on an assert. Regards, Edgar -- Edgar Grimberg System Developer Zylin AS ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html Phone: (+47) 51 63 25 00 --0016e6dab55ed68e0604890ecf44 Content-Type: text/x-patch; charset=US-ASCII; name="dlmalloc.patch" Content-Disposition: attachment; filename="dlmalloc.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gagkm5aq0 Content-length: 1879 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIEVkZ2FyIEdyaW1iZXJnIDxl ZGdhci5ncmltYmVyZ0B6eWxpbi5jb20+CiMgRGF0ZSAxMjc2NTk2MDM4IC03 MjAwCiMgTm9kZSBJRCA4MzFkNWU2MDNmMWY5MDM3ZGI5NWJiZjAzNjJjZmQy MjRlYjJlMTcwCiMgUGFyZW50ICBlYjMwMzA1OWI2ZTU1ZmU3Mzk4NjY4Mzdl ZjBlNmM5NzA4NzNiNDVlCkFkZCBhbiBhc3NlcnQgdG8gY2hlY2sgZm9yIGlu dmFsaWQgc2l6ZSBvZiB0aGUgYXJlbmEuCgpkaWZmIC1yIGViMzAzMDU5YjZl NSAtciA4MzFkNWU2MDNmMWYgcGFja2FnZXMvc2VydmljZXMvbWVtYWxsb2Mv Y29tbW9uL2N1cnJlbnQvQ2hhbmdlTG9nCi0tLSBhL3BhY2thZ2VzL3NlcnZp Y2VzL21lbWFsbG9jL2NvbW1vbi9jdXJyZW50L0NoYW5nZUxvZwlUaHUgSnVu IDEwIDIwOjQ2OjE4IDIwMTAgKzAwMDAKKysrIGIvcGFja2FnZXMvc2Vydmlj ZXMvbWVtYWxsb2MvY29tbW9uL2N1cnJlbnQvQ2hhbmdlTG9nCVR1ZSBKdW4g MTUgMTI6MDA6MzggMjAxMCArMDIwMApAQCAtMSwzICsxLDggQEAKKzIwMTAt MDYtMTUgRWRnYXIgR3JpbWJlcmcgPGVkZ2FyLmdyaW1iZXJnQHp5bGluLmNv bT4KKworCSogc3JjL2RsbWFsbG9jLmN4eCBDeWdfTWVtcG9vbF9kbG1hbGxv Y19JbXBsZW1l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