Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4083816
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:21:40+00:00 2026-05-20T18:21:40+00:00

I am developing some software in C. One of the targets in my makefile

  • 0

I am developing some software in C. One of the targets in my makefile runs a test, and I use time to record the runtime and valgrind to check for memory leaks. When I invoke one of the smaller tests directly from the command line, I get this.

$ time valgrind bin/test data/gff3/example1.gff3 data/gff3/example2.gff3
==27268== Memcheck, a memory error detector
==27268== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==27268== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==27268== Command: bin/test data/gff3/example1.gff3 data/gff3/example2.gff3
==27268== 
==27268== 
==27268== HEAP SUMMARY:
==27268==     in use at exit: 0 bytes in 0 blocks
==27268==   total heap usage: 4,001 allocs, 4,001 frees, 152,648 bytes allocated
==27268== 
==27268== All heap blocks were freed -- no leaks are possible
==27268== 
==27268== For counts of detected and suppressed errors, rerun with: -v
==27268== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)

real    0m1.460s
user    0m1.330s
sys 0m0.110s

However, when I invoke the test from my makefile (using the same exact command), I get this.

$ make mem
time valgrind bin/test data/gff3/example1.gff3 data/gff3/example2.gff3
==27265== Memcheck, a memory error detector
==27265== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==27265== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==27265== Command: bin/test data/gff3/example1.gff3 data/gff3/example2.gff3
==27265== 
==27265== 
==27265== HEAP SUMMARY:
==27265==     in use at exit: 0 bytes in 0 blocks
==27265==   total heap usage: 4,001 allocs, 4,001 frees, 152,648 bytes allocated
==27265== 
==27265== All heap blocks were freed -- no leaks are possible
==27265== 
==27265== For counts of detected and suppressed errors, rerun with: -v
==27265== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)
1.32user 0.10system 0:01.55elapsed 91%CPU (0avgtext+0avgdata 214752maxresident)k
24inputs+8outputs (1major+18568minor)pagefaults 0swaps

There seem to be line break issues with the output of the time program at the bottom, as well as some additional output I didn’t see when invoking directly from the command line. I’ve seen this before when I’m trying to time a job I’ve run with nohup.

Why is this happening and what can I do to get consistent results?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:21:40+00:00Added an answer on May 20, 2026 at 6:21 pm

    time is a bash builtin. The output from your Makefile looks like the output of /usr/bin/time. The easiest way to get consistent results is to run ‘/usr/bin/time’ instead of time on the command line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing some convenience wrappers around another software package that defines a bash
I am currently developing some user controls so that I can use them at
I'm new here. I'm developing some Asp.Net applications and i wanna test them on
I am developing some scientific software for my university. It is being written in
Some software I am developing requires the presence of a USB device (which I
While developing software, developers always tend to curse about some language specifics, improvements that
I'm developing some HTTP server software on Linux that uses JetS3t to retrieve files
I am developing a software in C#. On user dashboard there will be some
my name is Timothy Sassone. I am working on developing some scheduling software of
I am developing initscripts for some of our software, and am having difficulty deciding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.