ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've written a 3D program using GLUT and wanted to check for memory leaks with Valgrind. However, when I run
valgrind --tool=memcheck myProgram
it takes over 2 minutes for the window to display anything, and then everything runs slowly - whereas when run normally everything is fine.
I appreciate valgrind is doing Wizzardry behind the scenes for me, but is there any way of getting it to do it... a bit faster?
EDIT: the 2 minute figure I quoted is inaccurate, it actually turns out my window manager (xmonad) is playing silly buggers with the window, and only displays the content if you e.g. retile the workspace, or move the window to a different workspace. However, the speed problem still persists...
Hm, yeah, good suggestion, though unfortunately as tuxdev suggested it is a game, so relies on user interaction. Perhaps I could script actions to be carried out automatically and then do the same. Thanks for the suggestions I'll provisionally mark it as solved, but would still welcome any suggestions!
Hm, yeah, good suggestion, though unfortunately as tuxdev suggested it is a game, so relies on user interaction.
Well, you could skip just some of the opengl calls, eg just draw wire-frames.
You might also try using the Boehm GC as a leak detector. I expect that would be faster than both valgrind and drmemory, since it isn't checking for memory corruption. In fact, you may not notice any performance loss at all. Of course, if you actually do have memory corruption it won't help you...