http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746



             Bug #: 56746

           Summary: 4.8 regression: increased memory usage when compiling

                    C++

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: math...@gaunard.com





On my C++ project I have observed significant increased memory usage between

GCC 4.6/4.7 and 4.8.



Unfortunately I do not have a testcase, but compiling the test

"core.utility.functions.whereij.unit" of my template-heavy project NT2

(https://github.com/MetaScale/nt2) gives the following results:



g++-4.7

  User time (seconds): 155.76

  System time (seconds): 4.62

  Percent of CPU this job got: 99%

  Elapsed (wall clock) time (h:mm:ss or m:ss): 2:40.58

  Average shared text size (kbytes): 0

  Average unshared data size (kbytes): 0

  Average stack size (kbytes): 0

  Average total size (kbytes): 0

  Maximum resident set size (kbytes): 2781396

  Average resident set size (kbytes): 0

  Major (requiring I/O) page faults: 121

  Minor (reclaiming a frame) page faults: 726987

  Voluntary context switches: 288

  Involuntary context switches: 547

  Swaps: 0

  File system inputs: 31104

  File system outputs: 15320

  Socket messages sent: 0

  Socket messages received: 0

  Signals delivered: 0

  Page size (bytes): 4096

  Exit status: 0



g++-4.8

  User time (seconds): 155.13

  System time (seconds): 6.50

  Percent of CPU this job got: 99%

  Elapsed (wall clock) time (h:mm:ss or m:ss): 2:41.68

  Average shared text size (kbytes): 0

  Average unshared data size (kbytes): 0

  Average stack size (kbytes): 0

  Average total size (kbytes): 0

  Maximum resident set size (kbytes): 3972292

  Average resident set size (kbytes): 0

  Major (requiring I/O) page faults: 0

  Minor (reclaiming a frame) page faults: 1048923

  Voluntary context switches: 11

  Involuntary context switches: 576

  Swaps: 0

  File system inputs: 0

  File system outputs: 12368

  Socket messages sent: 0

  Socket messages received: 0

  Signals delivered: 0

  Page size (bytes): 4096

  Exit status: 0



So it goes from 2.65GB to 3.79GB.

Details of the versions used below.



$ g++-4.7 -v

Using built-in specs.

COLLECT_GCC=g++-4.7

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5'

--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs

--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr

--program-suffix=-4.7 --enable-shared --enable-linker-build-id

--with-system-zlib --libexecdir=/usr/lib --without-included-gettext

--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7

--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu

--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object

--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic

--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu

--target=x86_64-linux-gnu

Thread model: posix

gcc version 4.7.2 (Debian 4.7.2-5)



$ g++-4.8 -v

Using built-in specs.

COLLECT_GCC=g++-4.8

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Debian 4.8.0-1'

--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs

--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr

--program-suffix=-4.8 --enable-shared --enable-linker-build-id

--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix

--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls

--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug

--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin

--with-system-zlib --enable-objc-gc --enable-multiarch --with-arch-32=i586

--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic

--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu

--target=x86_64-linux-gnu

Thread model: posix

gcc version 4.8.0 (Debian 4.8.0-1)

Reply via email to