From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12249 invoked by alias); 28 Sep 2005 22:46:01 -0000 Mailing-List: contact glibc-bugs-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sources.redhat.com Received: (qmail 11688 invoked by uid 48); 28 Sep 2005 22:45:55 -0000 Date: Wed, 28 Sep 2005 22:46:00 -0000 Message-ID: <20050928224555.11686.qmail@sourceware.org> From: "drepper at redhat dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20050917180908.1349.jkearney@endeca.com> References: <20050917180908.1349.jkearney@endeca.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/1349] malloc_usable_size() incorrect when MALLOC_CHECK_>0 X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00363.txt.bz2 List-Id: ------- Additional Comments From drepper at redhat dot com 2005-09-28 22:45 ------- You are misusing malloc_usable_size(). The function gives you information on how much memory a really call can provide you in place. It does not automagically extends the memory block. The realloc call is needed. Admittedly, the information returned by malloc_usable_size() doesn't take the magic byte into account and therefore a really call, which would normally be extended in place, can require a repositioning. But this is no big issue and not worth changing. In summary: your test code is wrong and deserves to crash. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID http://sourceware.org/bugzilla/show_bug.cgi?id=1349 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.