From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4040 invoked by alias); 19 Aug 2005 09:20:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4024 invoked by uid 48); 19 Aug 2005 09:20:06 -0000 Date: Fri, 19 Aug 2005 09:21:00 -0000 From: "avi at argo dot co dot il" To: gcc-bugs@gcc.gnu.org Message-ID: <20050819092003.23477.avi@argo.co.il> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/23477] New: default-initializing array new expression uses memcpy() instead of memset(), bloats executable X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg02197.txt.bz2 List-Id: the program int main() { new int[10000000](); } generates a 40MB executable. it compiles into a memcpy() of 40MB of zeros into the newly-allocated array. tested at -O0 and -O3. gcc version 4.0.1 20050727 (Red Hat 4.0.1-5) -- Summary: default-initializing array new expression uses memcpy() instead of memset(), bloats executable Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: avi at argo dot co dot il CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i386-redhat-linux GCC host triplet: i386-redhat-linux GCC target triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23477