Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I wrote a program that multiplies 2 matrices using multi-threads and another one using multiple processes and shared memory. Both in C. I need to find the total memory ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    1

    How to find total memory usage of a program?


    Hello, I wrote a program that multiplies 2 matrices using multi-threads and another one using multiple processes and shared memory. Both in C.
    I need to find the total memory usage of these programs. I know of the top command, but when my matrices are relatively small they don't even show up on top because they complete so fast, how can I find the memory usage for these instances?
    Also, how can I find the total turnaround time of my programs?

    Any help would be appreciated, thanks in advance.

  2. #2
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309

    Smile

    To find total memory usage of a program you put these comands on terminal
    Code:
    [ved@localhost ~]$ free
    Code:
    [ved@localhost ~]$ cat /proc/meminfo

    i think it help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •