Projects using valgrind

Содержание:

When should you use Valgrind?

It depends on your exact needs. Here are some examples of when
people use Valgrind’s bug-detecting tools.

  • All the time. For small programs with short run-times, when
    developing you can always run the program under a Valgrind tool
    (usually Memcheck), knowing that memory bugs
    will be found immediately.
  • In automatic testing. By using Valgrind tools in your
    automatic unit, integration, system, or regression test, you can
    be confident no code will be unchecked.
  • After big changes. To ensure new bugs haven’t been introduced
    in the new code.
  • When a bug occurs. Get instant feedback about what the bug
    is, where it occurred, and why.
  • When a bug is suspected. Is your program behaving oddly? Use
    a Valgrind tool to discover if a bug is the cause.
  • Before a release. To give you confidence that your new
    release is as stable and bug-free as possible.
  • As for Valgrind’s profiling tools, use those whenever you
    want information about how your program is spending its time, or
    you want to speed it up.

GNU Profiler

GNU Profiler (gprof) — один из старейших профайлеров, доступных для
операционных систем типа UNIX. Он входит в состав пакета gcc, и потому может
быть использован для профилирования программ, написанных на любом поддерживаемом
им языке (а это не только C/C++, но и Objective-C, Ada, Java).

Сам по себе gprof не является инструментом профилирования, а лишь позволяет
отобразить профильную статистику, которая накапливается приложением во время
работы (само собой разумеется, по умолчанию никакое приложение этого не делает,
но может начать, если собрать программу с аргументом ‘-pg’).

Рассмотрим, как это работает в реальных условиях. Чтобы ощутить все
достоинства gprof, мы применим ее не к какому-нибудь абстрактному, искусственно
созданному приложению, а к самому настоящему повседневно используемому. Пусть
это будет gzip.

Получаем и распаковываем исходники архиватора:

Устанавливаем инструменты, необходимые для сборки (в Ubuntu это делается
через инсталляцию мета-пакета build-essential):

Запускаем конфигуратор сборки, передав в переменной окружения CFLAGS аргумент
‘-pg’:

Компилируем программу:

Теперь у нас есть бинарник gzip, способный вести статистику своего
исполнения. Каждый его запуск будет сопровождаться генерацией файла gmon.out:

Этот файл не предназначен для чтения человеком, но может быть использован для
создания подробного отчета об исполнении:

Наиболее важная часть полученного файла показана на скриншоте.

Каждая строка — это статистика исполнения одной функции, столбцы — различные
показатели. Нас интересуют первый, третий, четвертый и седьмой столбцы. Они
отображают информацию об общем количестве времени, затраченном на исполнение
функции (первый столбец — в процентах, третий — в секундах), количестве ее
вызовов и имени.

Попробуем проанализировать отчет. Первой в списке идет функция deflate,
которая была вызвана всего один раз, но «сожрала» 29% всего времени исполнения
программы. Это реализация алгоритма компрессии, и, если бы перед нами стояла
задача оптимизировать gzip, мы должны были бы начать именно с нее. 22% времени
ушло на исполнение функции longest_match, но, в отличие от deflate, она была
вызвана аж 450 613 081 раз, поэтому каждый отдельный вызов функции занимал
ничтожное количество времени. Это второй кандидат на оптимизацию. Функция
fill_window отняла 13% всего времени и была вызвана «всего» 22 180 раз.
Возможно, и в этом случае оптимизация могла бы дать результаты.

Промотав файл отчета до середины (кстати, сразу за таблицей идет подробная
справка обо всех ее столбцах, что очень удобно), мы доберемся до так называемого
«графа вызовов» (Call graph). Он представляет собой таблицу, разбитую на записи,
отделенные друг от друга пунктиром (повторяющимися знаками минуса). Каждая
запись состоит из нескольких строк, при этом вторая строка вопреки здравому
смыслу называется «первичной» и описывает функцию, которой посвящена запись.
Строкой выше располагается описание вызывающей ее функции, а ниже — вызываемых
ей.

Столбцы содержат следующую информацию (слева направо): индекс (index, он есть
только в первичной строке и, по сути, ничего не значит); процент времени,
который уходит на выполнение функции (% time); количество времени, затрачиваемое
на ее выполнение в секундах (self); количество времени, затрачиваемое на
выполнение функции и всех вызываемых ею функций (children); количество вызовов
функции (called) и ее имя (name).

Граф вызовов оказывается очень полезен, когда речь заходит об оптимизации
чужого кода. Становятся видны не только узкие места программы, но и вся логика
ее работы, которая может быть неочевидна при изучении исходников.

Инструменты

В состав пакета Valgrind входит множество инструментов (некоторые дополнительные инструменты не входят в его состав). Инструмент по умолчанию (и наиболее используемый) — Memcheck. Вокруг почти всех инструкций Memcheck вставляет дополнительный код инструментирования, который отслеживает законность (вся невыделенная память изначально помечается как некорректная или «неопределенная», пока не будет инициализирована одним из определенных состояний, вероятно из другой памяти) и адресуемость (подлежит ли память по указанному адресу выделению, то есть пуста ли она) операций с памятью, что сохраняется в так называемые V-биты и A-биты соответственно. По ходу перемещения данных и манипулирования ими, код инструментирования отслеживает значения A- и V-битов, чтобы они всегда были корректны на однобитовом уровне (single-bit level).

Более того, Memcheck заменяет стандартное выделение памяти языка Си собственной реализацией, которая, помимо прочего, включает в себя защиту памяти (memory guards) вокруг всех выделенных блоков (у которых A-биты помечены как «некорректные»). Данная возможность позволяет Memcheck обнаруживать ошибки переполнения буфера на единицу (off-by-one buffer overflows), при которых программа считывает или записывает память вне выделенного блока (с небольшим выходом за границу). (Другой способ решения этой проблемы включает в себя реализацию граничных указателей в компиляторе, что несколько снижает вероятность возникновения необнаруживаемых ошибок, особенно в памяти, выделенной под стек, а не под кучу, но это требует перекомпиляции всего инструментируемого двоичного кода.) Проблемы, которые может обнаружить Memcheck, включают в себя:

  • попытки использования неинициализированной памяти,
  • чтение/запись в память после её освобождения,
  • чтение/запись за границами выделенного блока,
  • утечки памяти.

Ценой этого является потеря производительности. Программы, запущенные под Memcheck, как правило, выполняются в 5-12 раз медленнее, чем при выполнении без Valgrind, а также используют больший объём памяти (за счет выделения значительных дополнительных расходов памяти). Поэтому код редко постоянно запускают под Memcheck / Valgrind. Наиболее распространена ситуация, когда или отслеживают какую-либо определенную ошибку, или проверяют, что в коде нет скрытых ошибок определённых типов.

В дополнение к Memcheck, Valgrind имеет и другие инструменты.

  • Addrcheck — облегченная версия Memcheck, работающая гораздо быстрее и потребляющая меньше памяти, но и обнаруживающая меньшее количество типов ошибок. Этот инструмент был удален в версии 3.2.0.
  • Massif — профилировщик кучи.
  • Helgrind и DRD — инструменты, способные отслеживать состояние гонки и подобные ошибки в многопоточном коде.
  • Cachegrind — профилировщик кэша и его графический интерфейс KCacheGrind.
  • Callgrind — профилировщик кода, может использовать графический интерфейс KCacheGrind.
  • SGCheck — экспериментальный инструмент для поиска схожих ошибок по аналогии с memcheck, но с тем отличием, что ищет ошибки в стеке, а не в куче.

Office Software

  • OpenOffice:
    an open source multi-platform office productivity
    suite. (Examples
    of bugs found.)
  • StarOffice:
    a commercial multi-platform office productivity suite, based
    on OpenOffice.
  • AbiWord:
    a multi-platform, full-featured and ultra-efficient word
    processor.
  • KOffice:
    a multi-application, integrated office suite.
  • Gnumeric:
    a replacement for proprietary spreadsheets.
  • Evolution:
    integrated email, calendar, scheduling, contact management
    and task-list system.
  • Mozilla Thunderbird:
    a powerful email and newsgroup client derived from the
    Mozilla suite.
  • Krita:
    a painting and image editing application.

Обзор

Valgrind по сути является виртуальной машиной, использующей методы JIT-компиляции, среди которых — динамическая перекомпиляция. То есть, оригинальная программа не выполняется непосредственно на основном процессоре. Вместо этого Valgrind сначала транслирует программу во временную, более простую форму, называемую промежуточным представлением (Intermediate Representation, сокр. IR), которая сама по себе не зависит от процессора и находится в SSA-виде. После преобразования инструмент (см. ниже) может выполнять любое необходимое преобразование IR до того, как Valgrind оттранслирует IR обратно в машинный код и позволит основному процессору его исполнить. Её используют, даже несмотря на то, что для этого может использоваться динамическая трансляция (то есть, когда основной и целевой процессоры принадлежат к разным архитектурам). Valgrind перекомпилирует двоичный код для запуска на основном и целевом (или его симуляторе) процессорах одинаковой архитектуры.

Из-за этих преобразований значительно снижается производительность: обычно код, запущенный под Valgrind и «пустым» (ничего не делающим) инструментом, работает в 5—10 раз медленнее по сравнению с исполнением кода напрямую; а при использовании некоторых инструментов — до 100 раз медленнее. Тем не менее, IR-форма гораздо более удобна для инструментирования, чем оригинал, и она значительно упрощает написание инструментов, а для большинства проектов снижение производительности при отладке не является существенной проблемой.

Finding Memory Leaks With Valgrind

% valgrind --tool=memcheck program_name
...
=18515== malloc/free: in use at exit: 0 bytes in 0 blocks.
==18515== malloc/free: 1 allocs, 1 frees, 10 bytes allocated.
==18515== For a detailed leak analysis,  rerun with: --leak-check=yes
#include <stdlib.h>
int main()
{
    char *x = malloc(100); /* or, in C++, "char *x = new char */
    return 0;
}
% valgrind --tool=memcheck --leak-check=yes example1
==2116== 100 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2116==    at 0x1B900DD0: malloc (vg_replace_malloc.c:131)
==2116==    by 0x804840F: main (in /home/cprogram/example1)
==2330== 100 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2330==    at 0x1B900DD0: malloc (vg_replace_malloc.c:131)
==2330==    by 0x804840F: main (example1.c:5)

Programming Language Implementations

  • Perl: a general-purpose
    programming language; the duct-tape of the internet.
  • Python:
    an interpreted, interactive, object-oriented programming language.
  • PHP:
    a web-oriented scripting language.
  • Mono:
    a free implementation of the .NET development framework.
  • LLVM:
    a compiler infrastructure.
  • Pike:
    a dynamic programming language with powerful built-in data
    types allowing simple and fast data manipulation.
  • ST200 VLIW C compiler:
    the STMicroelectronics ST200 VLIW production C compiler.
  • Cyberscreen:
    a fourth generation language and rapid application
    development environment.
  • Lava: an
    experimental OO programming language implementation, including
    a structure editor.
  • Aikido: an
    interpreted prototyping and scripting language with a syntax
    that resembles C++ and Java.
  • DParser:
    a scannerless GLR parser/generator.
  • Qore:
    a dynamically-typed object-oriented language designed for interfacing,
    embedding logic in applications, and SMP scalability (released under
    the LGPL).
  • Lush:
    an object-oriented programming language designed for researchers,
    experimenters, and engineers interested in large-scale numerical and
    graphic applications.

Out Of Tree

The following ports have been done and are maintained outside the
Valgrind repository. Note that they may have
varying levels of completeness, may not work reliably, and may target
older versions of Valgrind.

  • x86/FreeBSD
    Doug Rabson and others haved done a fairly
    complete port of Valgrind 3.X. The FreeBSD porting team actively
    maintains the port. Snapshots of the work in progress are at
    this
    FreeBSD page.

  • x86/NetBSD
    Eric Auge, Kailash Sethuraman and Peter Bex are doing a port of
    Valgrind 3.X, available at this page.

  • sparc64/Linux and sparc64/Linux
    These ports of Valgrind on sparc64/Solaris (or sparcv9/Solaris) and sparc64/Linux
    are stalled. There is currently no effort to resume working on these ports.
    The code is available at this
    source code repository, branch for sparc64/Linux and
    for sparc64/Solaris.

Databases and Search Engines

  • MySQL:
    the World’s most popular open source database.
    (A thank you
    from MySQL.)
  • PostgreSQL:
    the World’s most advanced open source database.
  • SQLite:
    The most widely deployed database engine; a self-contained, zero-configuration, serverless in-process library. (Appreciation from SQLite.)
  • Teratext Database System:
    a terabyte-capable text database.
  • MonetDB:
    a high performance database supporting complex queries over
    tables with hundreds of columns and multi-million rows.
  • Natix:
    a native XML database management system.
  • Teracruz dbAppliance:
    a database performance monitoring and acceleration tool.
  • Exalead:
    a search and navigation platform, including search engine,
    XML processing libraries, and statistical linguistics.
  • Cyberquery:
    a high performance ad-hoc query and production reporting system.
  • FAST
    Data Search: an enterprise real-time search and
    information retrieval system.
  • Xapian:
    an open source probabilistic information retrieval library.

Development Tools

  • GNU ddd:
    a graphical front-end for GDB, DBX, WDB, Ladebug, JDB, XDB,
    bashdb, and the Perl, Python and PHP debuggers.
  • OProfile:
    a system-wide, kernel- and user-space profiler for Linux.
  • Monotone:
    a free, distributed version control system.
  • Squish:
    a cross-platform automated GUI testing framework for Qt/C++
    applications.
  • Dart:
    an open source, distributed, software quality system.
  • CMake:
    a cross-platform, open source make system.
  • eboxy:
    a tool for creating graphical user interfaces for set-top
    boxes.
  • Umbrello:
    a UML modeller.
  • Zero:
    a flexible debugger for C and C++ applications on Linux.

System

  • Samba:
    an open source suite providing seamless file and print
    services to SMB/CIFS clients.
  • Common UNIX Printing System (CUPS):
    a portable printing layer for UNIX-based operating systems.
  • Xinetd:
    a secure and powerful replacement for inetd, the internet
    services daemon.
  • ntop:
    a network traffic probe that shows network usage.
  • Prelude IDS:
    a hybrid intrusion detection system for network/host
    security.
  • SynCE:
    a WinCE communications layer.
  • Gutenprint:
    printer drivers for use with Ghostscript, CUPS, Foomatic,
    and The GIMP.
  • NX:
    X Window compression software.
  • Xsupplicant:
    an 802.1X client for Linux.
  • ICPLD: A
    network connection performance monitor.
  • RIOT: The friendly
    operating system for the Internet of Things.

6. One more thing

Mr Artem reached out to me recently about his awesome software for debugging memory issues. He built Deleaker, which is a modern substitution ofValgrind. Deleaker supports C as well as C++/Delphi/.Net etc. In general, it doesn’t matter what language is used to write code as it works at lower level, hooking allocation/deallocation functions and storing call stacks.

And having a nice GUI to work with just seems much more efficient to me, which is why I love jetBrains’ products.

  • Check this blog for a comparison between Deleaker and Valgrind, why it is better.
  • Check the Deleaker official site for more information.

Thanks for reading!

Follow me (albertgao) on twitter, if you want to hear more about my interesting ideas.

Tools

Memcheck

There are multiple tools included with Valgrind (and several external ones). The default (and most used) tool is Memcheck. Memcheck inserts extra instrumentation code around almost all instructions, which keeps track of the validity (all unallocated memory starts as invalid or «undefined», until it is initialized into a deterministic state, possibly from other memory) and addressability (whether the memory address in question points to an allocated, non-freed memory block), stored in the so-called V bits and A bits respectively. As data is moved around or manipulated, the instrumentation code keeps track of the A and V bits, so they are always correct on a single-bit level.

In addition, Memcheck replaces the standard C memory allocator with its own implementation, which also includes memory guards around all allocated blocks (with the A bits set to «invalid»). This feature enables Memcheck to detect off-by-one errors where a program reads or writes outside an allocated block by a small amount. The problems Memcheck can detect and warn about include the following:

  • Use of uninitialized memory
  • Reading/writing memory after it has been ‘d
  • Reading/writing off the end of ‘d blocks
  • Memory leaks

The price of this is lost performance. Programs running under Memcheck usually run 20–30 times slower than running outside Valgrind and use more memory (there is a memory penalty per allocation). Thus, few developers run their code under Memcheck (or any other Valgrind tool) all the time. They most commonly use such tools either to trace down some specific bug, or to verify that there are no latent bugs (of the kind Memcheck can detect) in the code.

Other tools

In addition to Memcheck, Valgrind has several other tools:

  • None, runs the code in the virtual machine without performing any analysis and thus has the smallest possible CPU and memory overhead of all tools. Since valgrind itself provides a trace back from a segmentation fault, the none tool provides this traceback at minimal overhead.
  • Addrcheck, similar to Memcheck but with much smaller CPU and memory overhead, thus catching fewer types of bugs. Addrcheck has been removed as of version 3.2.0.
  • Massif, a heap profiler. The separate GUI massif-visualizer visualizes output from Massif.
  • Helgrind and DRD, detect race conditions in multithreaded code
  • Cachegrind, a cache profiler. The separate GUI KCacheGrind visualizes output from Cachegrind.
  • Callgrind, a callgraph analyzer created by Josef Weidendorfer was added to Valgrind as of version 3.2.0. KCacheGrind can visualize output from Callgrind.
  • DHAT, dynamic heap analysis tool which analyzes how much memory is allocated and for how long as well as patterns of memory usage.
  • exp-sgcheck (named exp-ptrcheck prior to version 3.7), an experimental tool to find stack and global array overrun errors which Memcheck cannot find. Some code results in false positives from this tool.
  • exp-bbv, a performance simulator that extrapolates performance from a small sample set.

There are also several externally developed tools available. One such tool is ThreadSanitizer, another detector of race conditions.

Graphics and Visualization

  • RenderMan:
    rendering package used for all of Pixar’s movies, The Lord of the Rings,
    The Matrix Trilogy, the Star Wars prequels, etc.
  • The GIMP:
    the GNU Image Manipulation Program.
  • Blender:
    a free open source 3D content creation suite.
  • OpenSG:
    a portable scenegraph system for creating realtime graphics
    programs, e.g. for virtual reality applications.
  • EQUINOX-3D:
    a modeling, animation and renderering suite for 3D graphics
    on Linux and Unix.
  • BrainVISA / Anatomist:
    a visualization tool for brain mapping, dedicated to
    structural data browsing.
  • VTK:
    an open source software system for 3D computer graphics,
    image processing, and visualization.
  • Coin:
    a multi-platform scene graph library for realtime 3D graphics.
  • ParaView:
    a visualizer for large data sets.
  • KolourPaint:
    an easy-to-use paint program for KDE.
  • GraphicsMagick:
    a collection of utilities, libraries, and scripting
    interfaces for performing image processing.
  • 3Delight: A fast
    RenderMan-compliant renderer.
  • Leptonica: An open
    source C library for efficient image processing and image
    analysis operations.
  • Insight Toolkit:
    ITK is an open source software system to support the Visible Human
    Project.

4.How to deal with it?

A brief first:

The idea is simple, the procedures is still easy but take a little bit longer than expected. But I will cover all the commands 🙂

  1. Open in Windows.
  2. Update your Ubuntu package lists by
  3. Install SVN first via this command:
  4. Install subversion next: (Thanks to Ran Lottem)
  5. Find a folder you want to put the valgrind, anywhere is OK, we just need to compile.
  6. Download source code of Valgrind via SVN . It will download the codes and put them into a new folder called right under then folder you create or locate in step 3.
  7. Install the library used when compiling by
  8. Ran Lottem confirmed that you need to
  9. Go to the folder of Valgrind via
  10. Running the official bash script first by using
  11. Configure via .
  12. From now on, things will get much more normal. first, install via .
  13. Then , this command will build the files from many modules. Add if failed (Thanks Waleed Mahmoud).
  14. , it will copy compiled files into appropriate locations. Add if failed (Thanks Waleed Mahmoud).
  15. It’s done already, but feel free to use , it will delete all the temporary files generated while compiling.
  16. A will make things much better.
  17. Use as you wish.

Overview

Valgrind is in essence a virtual machine using just-in-time (JIT) compilation techniques, including dynamic recompilation. Nothing from the original program ever gets run directly on the host processor. Instead, Valgrind first translates the program into a temporary, simpler form called Intermediate Representation (IR), which is a processor-neutral, SSA-based form. After the conversion, a tool (see below) is free to do whatever transformations it would like on the IR, before Valgrind translates the IR back into machine code and lets the host processor run it. Valgrind recompiles binary code to run on host and target (or simulated) CPUs of the same architecture. It also includes a GDB stub to allow debugging of the target program as it runs in Valgrind, with «monitor commands» that allow you to query the Valgrind tool for various sorts of information.

A considerable amount of performance is lost in these transformations (and usually, the code the tool inserts); usually, code run with Valgrind and the «none» tool (which does nothing to the IR) runs at 20% to 25% of the speed of the normal program.

3. Try it first time.

It is a Ubuntu, so you might simply use the command. . Yes, it will work as a charm. But only for this part. If you want to use it, it will totally not work.

123456
--1791:0:aspacem   -1: ANON 0038000000-00383d5fff 4022272 r-x-- SmFixed d=0x000 i=205168  o=0       (0) m=0 /usr/lib/valgrind/memcheck-amd64-linux--1791:0:aspacem  Valgrind: FATAL: aspacem assertion failed:--1791:0:aspacem    segment_is_sane--1791:0:aspacem    at m_aspacemgr/aspacemgr-linux.c:1502 (add_segment)--1791:0:aspacem  Exiting now.

You may abort at this stage, since it is a beta feature, and the translation in the Sys-call level may seems a big deal. And after googling, you decide to abort. But, the story never ends like this 🙂

Development Environments and Libraries

  • KDE:
    an open source graphical desktop environment for Unix
    workstations.
  • GNOME:
    a desktop environment and developer platform for Unix and
    Linux systems.
  • libstdc++:
    the GNU C++ standard library.
  • Qt by Trolltech:
    a multi-platform, C++ application development
    framework.
  • uClibc:
    a compact C library for embedded systems.
  • libxml2/libxslt:
    GNOME’s multi-platform XML C parser and toolkit.
  • Boost C++ libraries:
    a collection of portable C++ source libraries.
  • Smieciuch++:
    a precise garbage collector library for C++.
  • XPLC:
    lightweight cross-platform components to aid software
    extension and reuse.
  • LibVNCServer:
    a free library which makes it fun to write a server that
    connects to VNCViewer.
  • FOX Toolkit:
    a platform-independent C++ toolkit for developing
    graphical user interface applications.
  • gtk2-perl:
    a set of perl bindings for Gtk+ 2.x and various related libraries.
  • VR Juggler:
    an open source library for developing cross platform virtual
    reality applications.
  • Mini-XML:
    a small XML parsing library.
  • Fast Light Toolkit (FLTK):
    a cross-platform C++ GUI toolkit for UNIX, Linux, Windows and MacOS X.
  • Opie:
    a graphical user environment for PDAs and other Linux
    devices.
  • iwear:
    a multi-library framework for mobile computers.
  • xynth:
    an embedded and portable windowing system.

Current

Valgrind supports the following platforms:

  • x86/Linux: up to and including SSSE3, but not higher — no SSE4, AVX, AVX2. This target is in maintenance mode now..
  • AMD64/Linux: up to and including AVX2. This is the primary development target and tends to be well supported.
  • PPC32/Linux, PPC64/Linux, PPC64LE/Linux: up to and including Power8.
  • S390X/Linux: supported.
  • ARM/Linux: supported since ARMv7.
  • ARM64/Linux: supported for ARMv8.
  • MIPS32/Linux, MIPS64/Linux: supported.
  • X86/Solaris, AMD64/Solaris, X86/illumos, AMD64/illumos: supported since Solaris 11.
  • X86/Darwin (10.10, 10.11), AMD64/Darwin (10.10, 10.11): supported.
  • ARM/Android, ARM64/Android, MIPS32/Android, X86/Android: supported.

On Linux, you must be running kernel 3.0 or later, and glibc
2.5.X or later. On Mac OS X you must be running 10.9.x or later.

For details of which distributions the current release
(valgrind-3.16.1) builds and runs its
regression tests on, see the
.

Why should you use Valgrind?

  • Valgrind will save you hours of debugging time. With
    Valgrind tools you can automatically detect many memory
    management and threading bugs. This gives you confidence that
    your programs are free of many common bugs, some of which would
    take hours to find manually, or never be found at all. You can
    find and eliminate bugs before they become a problem.
  • Valgrind can help you speed up your programs. With Valgrind
    tools you can also perform very detailed profiling to help find
    bottlenecks in your programs.
  • Valgrind is free. Free-as-in-speech: you can download it,
    read the source code, make modifications, and pass them on, all
    within the limits of the GNU GPL. And free-as-in-beer: we aren’t
    charging for it.
  • Valgrind runs on several popular platforms, such as x86/Linux,
    AMD64/Linux and PPC32/Linux. Valgrind works with all the major Linux
    distributions, including Red Hat, SuSE, Debian, Gentoo, Slackware,
    Mandrake, etc.
  • Valgrind is easy to use. Valgrind uses dynamic binary
    instrumentation, so you don’t need to modify, recompile or relink
    your applications. Just prefix your command line with valgrind
    and everything works.
  • Valgrind is not a toy. Valgrind is first and foremost a
    debugging and profiling system for large, complex programs. We
    have had feedback from users working on projects with up to 25
    million lines of code. It has been used on projects of all sizes,
    from single-user personal projects, to projects with hundreds of
    programmers.
  • Valgrind is suitable for any type of software. Valgrind has
    been used with desktop applications, libraries, databases, games, web
    browsers, network servers, distributed control systems, virtual reality
    frameworks, transaction servers, compilers, interpreters, virtual
    machines, telecom applications, embedded software, medical imaging,
    scientific programs, signal processing programs, video/audio programs,
    business intelligence software, financial/banking software, operating
    system daemons, etc, etc. See a list of projects using Valgrind.
  • Valgrind is widely used. Valgrind has been used by thousands
    of programmers across the world. We have received feedback from
    users in over 30 countries.
  • Valgrind works with programs written in any language. Because
    Valgrind works directly with program binaries, it works with
    programs written in any programming language, be they compiled,
    just-in-time compiled, or interpreted. The Valgrind tools are
    largely aimed at programs written in C and C++, because programs
    written in these languages tend to have the most bugs! But it
    can, for example, be used to debug and profile systems written in
    a mixture of languages. Valgrind has been used on programs
    written partly or entirely in C, C++, Java, Perl, Python,
    assembly code, Fortran, Ada, and many others.
  • Valgrind gives 100% coverage of user-space code, even within system
    libraries. You can even use Valgrind on programs for which you don’t
    have the source code.
  • Valgrind is extensible. Anyone can write powerful new tools that
    add arbitrary instrumentation to programs. This is much easier than
    writing such tools from scratch. This makes Valgrind ideal for
    experimenting with new kinds of program analysis tools.
    It has been used for research purposes by people at the following
    universities: Cambridge, MIT, UC Berkeley, UC Santa Barbara, Carnegie
    Mellon, Cornell, University of New Mexico, Australian National University,
    University of Melbourne, TU Muenchen (Munich) and Graz University of
    Technology.
  • Valgrind is actively maintained. The Valgrind developers are
    constantly working to fix bugs, improve Valgrind, and ensure it
    works as new Linux distributions and libraries come out. There
    are also mailing lists you can subscribe to, and contact if
    you’re having problems.

So what’s the catch? The main one is that programs run
significantly more slowly under Valgrind. Depending on which tool
you use, the slowdown factor can range from 5—100. This slowdown
is similar to that of similar debugging and profiling tools. But
since you don’t have to use Valgrind all the time, this usually
isn’t too much of a problem. The hours you’ll save debugging will
more than make up for it.

Summary

Related articlesDynamic
Memory Allocation, Part 1: Advanced Memory ManagementDynamic Memory Allocation, Part 2: Dynamic Memory Allocation and Virtual MemoryDynamic Memory Allocation, Part 3: Customized Allocators with Operator New and Operator DeleteDynamic Memory Allocation, Part 4: Common Memory Management Problems in C++Understanding
PointersUsing auto_ptr to
avoid memory leaks

Popular pages

  • Jumping into C++, the Cprogramming.com ebook
  • How to learn C++ or C
  • C Tutorial
  • C++ Tutorial
  • 5 ways you can learn to program faster
  • The 5 most common problems new programmers face
  • How to set up a compiler
  • How to make a game in 48 hours

Games

  • Unreal Tournament
    (inc. UT2003, UT2004): a multiplayer first-person
    shooter.
  • Medal of Honour:
    World War II first-person shooter.
  • America’s Army:
    Operations: the official US Army game.
  • Call of Duty: a World
    War II first-person shooter.
  • Battlefield 1942:
    a World War II first-person shooter.
  • Serious Sam: an
    arcade-action shooter.
  • Postal 2: a
    3D-perspective shooter.
  • netPanzer: an
    online multi-player tactical warfare game.
  • Anarchy Online:
    an award-winning massive multiplayer online roleplaying game
    (MMORPG).
  • SuperTux: a 2D
    platform game.
  • LinCity-NG: a
    city simulation game.
  • Glest:
    a 3D real-time strategy game.
  • Battle for Wesnoth: a
    turn-based strategy game with a fantasy theme.
  • MikkiMUD 3.2:
    an online multi-user dimension.
  • Crystal Space: a
    portable 3D game engine.
  • ScummVM: a virtual
    machine for classic graphical adventure games.
  • QSDK: a
    high performance cross-platform game engine for Windows,
    Linux, PS2 and XBox. Free for non-console development.
  • Ca3D-Engine:
    a multi-player, multi-platform, real-time 3D engine.
  • Worldforge:
    an engine for online roleplaying games.
  • PvPGN:
    a battle.net emulation server.
  • Xfire:
    an instant messenger for gamers.
  • PokerTH: an open source Texas
    Hold’em poker engine for Linux, Mac OS X and Windows.

Other

  • Eurocontrol/CFMU’s
    ETFMS: air traffic flow management for Europe; and
    IFPS: a flight plan validation and distribution system for all
    flights flying in/over Europe.
  • Dia: a
    diagram creator, particularly suited to drawing simple circuit
    diagrams, and more.
  • SportVision:
    various tools for virtual enhancements to live TV sports
    broadcasts.
  • ORINOCO: a tool to
    estimate the power dissipation of hardware/ASIC designs.
  • xmlBlaster: a
    publish/subscribe and PtP message oriented middleware with
    easy access from C, C++, Java, Perl, Python.
  • Papaya: a GTK+-2.0
    MUD client for UNIX and Windows.
  • LibMSWrite:
    a free, platform-independent library that reads and writes the
    MS Write 3.0/3.1 document format.
  • Mnet:
    a distributed file store.
  • Speed Dragon Tools:
    programming tools for the Speed Dragon ISDN PBX.
  • libExtractor:
    a library for extracting metadata from files.
  • MICO: a freely available
    and fully compliant C++ implementation of the CORBA
    standard.
  • Citadel: An open
    source, standalone, groupware and collaboration server.
  • ArahWeave:
    a dobby and jacquard weaving CAD/CAM program.
  • Survex:
    an open source cave-surveying software package.
  • xfce4-xmms2-client:
    a GUI client for xmms2.
  • ClamAV:
    an open source (GPL) anti-virus toolkit for UNIX, designed especially
    for e-mail scanning on mail gateways.

По данным портала ЗАЧЕСТНЫЙБИЗНЕСОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ «ВАЛЬГРИНД»По данным портала ЗАЧЕСТНЫЙБИЗНЕС2634078755

О компании:
ООО «ВАЛЬГРИНД» ИНН 2634078755, ОГРН 1072635022833 зарегистрировано 16.11.2007 в регионе Ставропольский Край по адресу: 355000, Ставропольский кр, город Ставрополь, улица Ленина, 251. Статус: Ликвидировано. Размер Уставного Капитала 10 000,00 руб.

Руководителем организации является: Директор — Костюков Андрей Владимирович, ИНН . У организации 1 Учредитель. Основным направлением деятельности является «».

Статус: ?
Ликвидировано

Дата регистрации: По данным портала ЗАЧЕСТНЫЙБИЗНЕС

?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

16.11.2007

Дата ликвидации: 31.08.2009

ОГРН 
?
 
1072635022833   
присвоен: 16.11.2007
ИНН 
?
 
2634078755
КПП 
?
 
263401001

Юридический адрес: ?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
355000, Ставропольский кр, город Ставрополь, улица Ленина, 251
получен 16.11.2007
зарегистрировано по данному адресу:
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

По данным портала ЗАЧЕСТНЫЙБИЗНЕС
Руководитель Юридического Лица
 ?По данным портала ЗАЧЕСТНЫЙБИЗНЕС
Директор
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Костюков Андрей Владимирович

ИНН ?

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

действует с По данным портала ЗАЧЕСТНЫЙБИЗНЕС
16.11.2007

Учредители ? ()
Уставный капитал: По данным портала ЗАЧЕСТНЫЙБИЗНЕС
10 000,00 руб.

Костюков Андрей Владимирович
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

10 000,00руб., 16.11.2007 , ИНН

Основной вид деятельности: ?По данным портала ЗАЧЕСТНЫЙБИЗНЕС
45.21.1

Дополнительные виды деятельности:

Единый Реестр Проверок (Ген. Прокуратуры РФ) ?

Реестр недобросовестных поставщиков: ?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

не числится.

Налоговый орган ?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
Инспекция Федеральной Налоговой Службы По Ленинскому Району Г. Ставрополя
Дата постановки на учет: По данным портала ЗАЧЕСТНЫЙБИЗНЕС
16.11.2007

Регистрация во внебюджетных фондах

Фонд Рег. номер Дата регистрации
ПФР 
?
 
036033101681
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
30.11.2007
ФСС 
?
 
262301400826231
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
30.11.2007

Финансовая отчетность ООО «ВАЛЬГРИНД» ?

В качестве Поставщика:

,

на сумму

В качестве Заказчика:

,

на сумму

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Судебные дела ООО «ВАЛЬГРИНД» ?

найдено по ИНН: По данным портала ЗАЧЕСТНЫЙБИЗНЕС

найдено по наименованию (возможны совпадения): По данным портала ЗАЧЕСТНЫЙБИЗНЕС

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Исполнительные производства ООО «ВАЛЬГРИНД»
?

найдено по наименованию и адресу (возможны совпадения): По данным портала ЗАЧЕСТНЫЙБИЗНЕС

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Лента изменений ООО «ВАЛЬГРИНД»
?

Не является участником проекта ЗАЧЕСТНЫЙБИЗНЕС ?

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *