‹ BackHN Continuity

Thread

Comparison of Malloc() Algorithms

144 points · 51 comments · egberts1

  1. Nnnes · · focus · HN ↗
    <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20260915165314&#x2F;https:&#x2F;&#x2F;egbert.net&#x2F;blog&#x2F;articles&#x2F;comparison-of-arena-architecture-in-malloc.html" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20260915165314&#x2F;https:&#x2F;&#x2F;egbert.ne...

    Funny SSL setup. Explanation from here <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49133598">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49133598

    &gt; Oh, certain browser will not work with this blog if it cannot negotiate ONLY for Cha-Cha&#x2F;Poly. It&#x27;s by design as a showcase of why that particular web browser refuses to do that.

    I assume the &quot;particular web browser&quot; is Chromium, which won&#x27;t load it on any OS I&#x27;ve tried. On Windows, Firefox and the built-in curl.exe also refuse to connect.

    1. bom-d-van · · focus · HN ↗
      legend.
    2. [deleted] · · focus · HN ↗

      [deleted]

    3. ncruces · · focus · HN ↗
      Thanks for the link.

      Article makes it look like nothing happened in the embed&#x2F;low-memory&#x2F;single-threaded malloc space in decades since Doug Lea&#x27;s malloc.

      I just implemented TLSF for my minimal Wasm libc: fragmentation is just as good, performance is a lot more consistent (and on average better), for a significant reduction in code size.

      <a href="http:&#x2F;&#x2F;www.gii.upv.es&#x2F;tlsf&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;www.gii.upv.es&#x2F;tlsf&#x2F;index.html

      <a href="https:&#x2F;&#x2F;github.com&#x2F;ncruces&#x2F;wasm2go&#x2F;blob&#x2F;main&#x2F;libc-gen&#x2F;c&#x2F;malloc_tlsf.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ncruces&#x2F;wasm2go&#x2F;blob&#x2F;main&#x2F;libc-gen&#x2F;c&#x2F;mall...

      1. egberts1 · · focus · HN ↗
        A great idea for another article. A focus, on embedded and malloc()

        I do do have a malloc() benchmark but it is in bad shape and directories have not coalesce nicely yet, tor a single run or a menu-driven one.

      2. thomasmg · · focus · HN ↗
        Interesting! I have also implemented a version of TLSF for my (currently single-threaded) programming language. I also found it to be good for my use case (embedded &#x2F; minimal code size). I&#x27;ll compare it against yours. One improvement I did is some kind of preallocation for small blocks. <a href="https:&#x2F;&#x2F;github.com&#x2F;thomasmueller&#x2F;bau-lang&#x2F;blob&#x2F;main&#x2F;src&#x2F;main&#x2F;java&#x2F;org&#x2F;bau&#x2F;parser&#x2F;StandardLib.java#L9" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;thomasmueller&#x2F;bau-lang&#x2F;blob&#x2F;main&#x2F;src&#x2F;main...
    4. egberts1 · · focus · HN ↗
      It keeps certain web scrapers and inline transparent proxies&#x2F;IDS&#x2F;XNS from fetching, 100%

      Certain browsers will suffer. Meh.

    5. quietbritishjim · · focus · HN ↗
      Firefox on Windows user here, and it loads the blog fine. I don&#x27;t have Chrome installed but Edge (which is Chromium engine based) doesn&#x27;t load it.
    6. dark-star · · focus · HN ↗
      I don&#x27;t get what this is supposed to prove. That my browser doesn&#x27;t allow websites to declare what encryption they use? I am pretty sure there&#x27;s a point to all of this, but please let me (and my browser) choose which encryptions I want to trust.

      Is this a spec violation or something?

      1. gspr · · focus · HN ↗
        Isn&#x27;t the idea that the server and client should agree on a common subset? Here, the server&#x27;s subset is very small, but not esoteric – so then surely it&#x27;s the client that&#x27;s lacking in features?
        1. egberts1 · · focus · HN ↗
          Precisely.

          Fix the browser.

        2. dark-star · · focus · HN ↗
          Yeah but I don&#x27;t want Chachacha, I prefer AES. If you can&#x27;t do AES, I&#x27;m not interested in the website :)
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.