Cygwin GCC setting for heap

This is a discussion on Cygwin GCC setting for heap within the C Programming forums, part of the General Programming Boards category; Guys, I wrote a tool for my cygwin shell to parse my CVS repository and find all modified files based ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1

    Cygwin GCC setting for heap

    Guys,

    I wrote a tool for my cygwin shell to parse my CVS repository and find all modified files based on the timestamp in \CVD\Entries(.log).

    I work with a lot of chained lists and allocate the mem on heap for the items .. and of course free() when not used. :-)

    So overall, we are talking about a tool that does a lot of recursive calls (directory parsing) and heap mem allocation.

    My problem is the performance of that tool. The very first time I run it, it takes forever to complete. Then the next time it just completes in just a second. I am not sure about the root cause for that.

    Maybe the heap is too small and needs to get extended at runtime ? I tries -Wl,--heap='really large number' but no difference.
    Maybe it's related to the harddrive ? I see lot of HDD action the first time, the second not more ?

    Do you have any ideas to make this faster.
    Thanks,
    slang

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    > Maybe it's related to the harddrive ? I see lot of HDD action the first time, the second not more ?
    Seems to me like the OS has effectively cached all the information, so if you run it again, all the relevant information is already in memory.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Setting SciTE to work with cygwin
    By Witchfinder in forum C Programming
    Replies: 1
    Last Post: 02-21-2009, 03:12 PM
  2. MATLAB user trying to use gcc in cygwin (with BLAS and LAPACK)
    By greek_tragedy in forum C Programming
    Replies: 0
    Last Post: 07-23-2007, 02:29 PM
  3. Setting GCC version
    By elliptic in forum Tech Board
    Replies: 1
    Last Post: 09-14-2006, 06:10 PM
  4. Help with Gcc on cygwin
    By cBegginer in forum Tech Board
    Replies: 4
    Last Post: 03-25-2005, 11:22 PM
  5. GCC (cygwin) much faster than MSVC, Borland?
    By Sargnagel in forum C Programming
    Replies: 15
    Last Post: 08-05-2003, 03:15 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21