<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.projectskyfire.org/index.php?action=history&amp;feed=atom&amp;title=How-to%3AAdvanced%3AValgrind</id>
	<title>How-to:Advanced:Valgrind - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.projectskyfire.org/index.php?action=history&amp;feed=atom&amp;title=How-to%3AAdvanced%3AValgrind"/>
	<link rel="alternate" type="text/html" href="https://wiki.projectskyfire.org/index.php?title=How-to:Advanced:Valgrind&amp;action=history"/>
	<updated>2026-04-17T18:39:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.projectskyfire.org/index.php?title=How-to:Advanced:Valgrind&amp;diff=584&amp;oldid=prev</id>
		<title>Admin: /* Tools */</title>
		<link rel="alternate" type="text/html" href="https://wiki.projectskyfire.org/index.php?title=How-to:Advanced:Valgrind&amp;diff=584&amp;oldid=prev"/>
		<updated>2013-01-21T22:07:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Tools&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:07, 21 January 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot;&gt;Line 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Valgrind has several tools/modes.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Valgrind has several tools/modes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The default tool is Memcheck and should be the most useful for &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Trinity&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The default tool is Memcheck and should be the most useful for &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SkyFire&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Memcheck ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Memcheck ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.projectskyfire.org/index.php?title=How-to:Advanced:Valgrind&amp;diff=583&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;{{Back-to:World:How-to:Advanced}}  == Overview ==  Valgrind is a programming tool/debugger.  &#039;&#039;&#039;To install:&#039;&#039;&#039; *You can install it from your distro&#039;s repo, eg.: &#039;&#039;apt-get inst...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.projectskyfire.org/index.php?title=How-to:Advanced:Valgrind&amp;diff=583&amp;oldid=prev"/>
		<updated>2013-01-21T22:07:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Back-to:World:How-to:Advanced}}  == Overview ==  Valgrind is a programming tool/debugger.  &amp;#039;&amp;#039;&amp;#039;To install:&amp;#039;&amp;#039;&amp;#039; *You can install it from your distro&amp;#039;s repo, eg.: &amp;#039;&amp;#039;apt-get inst...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Back-to:World:How-to:Advanced}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Valgrind is a programming tool/debugger.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To install:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*You can install it from your distro&amp;#039;s repo, eg.: &amp;#039;&amp;#039;apt-get install valgrind&amp;#039;&amp;#039; in Debian/Ubuntu.&lt;br /&gt;
*You can compile the source code from Valgrind&amp;#039;s site.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;More info:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*http://en.wikipedia.org/wiki/Valgrind&lt;br /&gt;
*http://valgrind.org/&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
Valgrind has several tools/modes.&lt;br /&gt;
The default tool is Memcheck and should be the most useful for Trinity.&lt;br /&gt;
&lt;br /&gt;
== Memcheck ==&lt;br /&gt;
&lt;br /&gt;
Memcheck is a memory error detector. Memcheck can detect a lot of things.&lt;br /&gt;
&lt;br /&gt;
You should start your core by this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
valgrind --tool=memcheck --leak-check=full --log-file=valgrind.log ./worldserver&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that: Your core become so &amp;#039;&amp;#039;&amp;#039;slow&amp;#039;&amp;#039;&amp;#039;(core startup 3-5mins+) and lost a lot of performance, so don&amp;#039;t try to use it with a lot of players.&lt;br /&gt;
&lt;br /&gt;
If you do a ctrl-c your log file should contains a lot of information. Most of them are &amp;quot;useless&amp;quot;, like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
==22709== Conditional jump or move depends on uninitialised value(s)&lt;br /&gt;
==22709==    at 0x401707D: (within /lib/ld-2.10.1.so)&lt;br /&gt;
==22709==    by 0x40052C0: (within /lib/ld-2.10.1.so)&lt;br /&gt;
==22709==    by 0x4007FFA: (within /lib/ld-2.10.1.so)&lt;br /&gt;
==22709==    by 0x400361C: (within /lib/ld-2.10.1.so)&lt;br /&gt;
==22709==    by 0x40153E6: (within /lib/ld-2.10.1.so)&lt;br /&gt;
==22709==    by 0x400138C: (within /lib/ld-2.10.1.so)&lt;br /&gt;
==22709==    by 0x4000AF7: (within /lib/ld-2.10.1.so)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number(22709) is the core&amp;#039;s process id(PID).&lt;br /&gt;
The log file has a summary part at the end of the log:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
==22709== LEAK SUMMARY:&lt;br /&gt;
==22709==    definitely lost: 1,308,624 bytes in 183,502 blocks.&lt;br /&gt;
==22709==    indirectly lost: 2,960 bytes in 31 blocks.&lt;br /&gt;
==22709==      possibly lost: 49,368 bytes in 1,088 blocks.&lt;br /&gt;
==22709==    still reachable: 69,714,748 bytes in 188,424 blocks.&lt;br /&gt;
==22709==         suppressed: 0 bytes in 0 blocks.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;definitely lost&amp;quot; is a 99.9% memory leak, eg.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
==22709== 360 bytes in 1 blocks are definitely lost in loss record 1,203 of 1,396&lt;br /&gt;
==22709==    at 0x4C2626C: operator new(unsigned long) (vg_replace_malloc.c:230)&lt;br /&gt;
==22709==    by 0xB65316: OutdoorPvPTF::SetupOutdoorPvP() (OutdoorPvPTF.cpp:228)&lt;br /&gt;
==22709==    by 0xB5DBCC: OutdoorPvPMgr::InitOutdoorPvP() (OutdoorPvPMgr.cpp:79)&lt;br /&gt;
==22709==    by 0xCF8912: World::SetInitialWorldSettings() (World.cpp:1661)&lt;br /&gt;
==22709==    by 0x8F4606: Master::Run() (Master.cpp:234)&lt;br /&gt;
==22709==    by 0x8F3B35: main (Main.cpp:154) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see a good and simple example at: http://valgrind.org/docs/manual/quick-start.html#quick-start.interpret&lt;br /&gt;
&lt;br /&gt;
You can read more about Memcheck at: http://valgrind.org/docs/manual/mc-manual.html&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>