You are Here:
Download Linux Lite 5.6 Final today - See Release Announcements



X Close Ad
X Close Ad
Setup Valgrind

Author (Read 843 times)

0 Members and 4 Guests are viewing this topic.

Setup Valgrind
« on: September 16, 2021, 07:03:34 PM »
 

Kevin Perez

  • New to Forums
  • *
  • 12
    Posts
  • Reputation: 0
Hey there everyone,

Not sure how much information one needs to help me get Valgrind to be fully setup. If necessary, I will post the version of Linux Lite and Code::Blocks currently installed on my computer. HOpefully, what is included will be sufficient.

I am currently using Code::Blocks as my compiler. I have created a simple project by the name of DynIntArray. in this project there are two classes:
DynIntArray & DynVoidArray. Each one has a dynamic array. In order to verify that my project is not leaking memory, I am hoping to use Valgrind. I have already installed it, but I now need to edit the bashrc file so it includes "export VALGRIND_LIB = '/usr/lib/valgrind'. Unfortunately, once I have opened the bashrc file to edit it, I am not sure how to save it. Furthermore, the video I was watching seems to be meant for Ubuntu rather than Linux Lite. How may I open, edit, and save the changes I wish to make to the .bashrc file? Hopefully, with some assistance, I can check to ensure the project is not leaking memory.

Thank you for reading this post, and I very much look forward to reading your responses.
 


Re: Setup Valgrind
« Reply #1 on: September 18, 2021, 06:21:58 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8156
    Posts
  • Country: nz
  • Reputation: 761
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 5.6 64bit

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Code: [Select]
mousepad ~/.bashrc
scroll to the bottom, enter your code. Then save the text file and do:

Code: [Select]
source ~/.bashrc
 

Re: Setup Valgrind
« Reply #2 on: September 19, 2021, 01:37:38 AM »
 

Kevin Perez

  • New to Forums
  • *
  • 12
    Posts
  • Reputation: 0
I copied and pasted the export VALGRIND_LIB = '/usr/lib/valgrind' into the file. Next, I saved it. Finally, I ran the command you suggested: source ~/.bashrc. Then I received the following error. It says, "bash: export: '=': not a valid identifier"
"bash: export: 'usr/lib/valgrind': not a valid identifier".

What would you suggest I replace inside of "export VALGRIND_LIB = '/usr/lib/valgrind'"?
 

Re: Setup Valgrind
« Reply #3 on: September 19, 2021, 01:45:38 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8156
    Posts
  • Country: nz
  • Reputation: 761
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 5.6 64bit

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
I'll need the link to the original instructions you used.

Sent from my mobile phone using Tapatalk

 

Re: Setup Valgrind
« Reply #4 on: September 19, 2021, 07:57:53 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1318
    Posts
  • Country: us
  • Reputation: 204
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 5.6 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D

  • Kernel: 5.x
Code: [Select]
/usr/lib/valgrindMake sure this is the correct file path to the lib file. Could be different for example.
Code: [Select]
~/yourusername/usr/lib/valgrind or something else.
TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: Setup Valgrind
« Reply #5 on: September 23, 2021, 09:04:03 PM »
 

Kevin Perez

  • New to Forums
  • *
  • 12
    Posts
  • Reputation: 0
I am unable to find the website responsible for giving me this instruction. I am not sure how to find it again now.

I did make sure Valgrind is located in the folder I mentioned earlier. Do any of you have experience getting Valgrind to work on your computers. The step I successfully completed is downloading and installing Valgrind on my computer. It is very definitely located at "/usr/lib/valgrind/" I just checked to make sure. Plus, that quote was copy and pasted from the directory.

What steps would you use to get Valgrind to work (in addition to the ones I have mentioned)? If it makes it easier to read:
  • Download Valgrind
  • Install Valgrind
  • {insert additional steps here necessary to get Valgrind setup and detect memory leaks}.
 

Re: Setup Valgrind
« Reply #6 on: September 24, 2021, 01:04:38 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8156
    Posts
  • Country: nz
  • Reputation: 761
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 5.6 64bit

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Never heard of it before myself.
 

Re: Setup Valgrind
« Reply #7 on: September 24, 2021, 10:46:11 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1318
    Posts
  • Country: us
  • Reputation: 204
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 5.6 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D

  • Kernel: 5.x
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 


Tags: valgrind 
 

X Close Ad
X Close Ad

Download Linux Lite 5.6 Final today - See Release Announcements