<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tcmalloc on Inliniac</title>
    <link>https://inliniac.net/blog/tag/tcmalloc/</link>
    <description>Recent content in Tcmalloc on Inliniac</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 17 Sep 2014 17:25:16 +0000</lastBuildDate>
    <atom:link href="https://inliniac.net/blog/tag/tcmalloc/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>detecting: malloc(-1) or malloc(0xffffffff)</title>
      <link>https://inliniac.net/blog/2014/09/17/detecting-malloc-1-or-malloc0xffffffff/</link>
      <pubDate>Wed, 17 Sep 2014 17:25:16 +0000</pubDate>
      <guid>https://inliniac.net/blog/2014/09/17/detecting-malloc-1-or-malloc0xffffffff/</guid>
      <description>&lt;p&gt;In Suricata we&amp;rsquo;re often not printing malloc errors. The reason is that we&amp;rsquo;re not willing to print such errors based on (attacker controlled) traffic. So often such cases are silently handled.&lt;/p&gt;&#xA;&lt;p&gt;We came across a bug though, where a integer underflow led to -1/0xffffffff being passed to malloc. Luckily, malloc just failed by returning NULL, and this return was properly handled. Still, passing such a large value to malloc is a bug, so I would like to catch it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Speeding up Suricata with tcmalloc</title>
      <link>https://inliniac.net/blog/2010/10/21/speeding-up-suricata-with-tcmalloc/</link>
      <pubDate>Thu, 21 Oct 2010 12:10:33 +0000</pubDate>
      <guid>https://inliniac.net/blog/2010/10/21/speeding-up-suricata-with-tcmalloc/</guid>
      <description>&lt;p&gt;&amp;rsquo;tcmalloc&amp;rsquo; is a library Google created as part of the &lt;a href=&#34;http://code.google.com/p/google-perftools/&#34;&gt;google-perftools suite&lt;/a&gt; for speeding up memory handling in a threaded program. It&amp;rsquo;s very simple to use and does work fine with Suricata. Don&amp;rsquo;t expect magic from it, but it should give you a few percent more speed.&lt;/p&gt;&#xA;&lt;p&gt;On Ubuntu, install the libtcmalloc-minimal0 package:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;apt-get install libtcmalloc-minimal0&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Then run Suricata as follows (on a single line):&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;LD_PRELOAD=&amp;quot;/usr/lib/libtcmalloc_minimal.so.0&amp;quot; ./src/suricata -c suricata.yaml -i eth0&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
