<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: dev_dwarf</title><link>https://news.ycombinator.com/user?id=dev_dwarf</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 13 Jun 2026 17:37:33 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=dev_dwarf" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by dev_dwarf in "My personal C coding style as of late 2023"]]></title><description><![CDATA[
<p>You'll find by looking at their older posts that the author has actually written quite a lot of elisp.</p>
]]></description><pubDate>Mon, 09 Oct 2023 23:02:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=37826544</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37826544</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37826544</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Arena allocator tips and tricks"]]></title><description><![CDATA[
<p>Your second paragraph doesn't make sense because the whole point of this type of allocation is to guarantee that you will reuse the same address space you just freed.</p>
]]></description><pubDate>Wed, 27 Sep 2023 19:52:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=37680302</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37680302</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37680302</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>Thats an interesting idea. I'm not sure I'm sold on it v.s. just having two seperate allocators and growing them seperately. The arena allocators I  use take advantage of virtual memory to grow which might change my perception of the tradeoffs involved, as I wouldn't typically need to resize one of my allocators (you can just aggressively over-reserve memory and then only commit what is actually used).</p>
]]></description><pubDate>Tue, 19 Sep 2023 20:59:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=37576515</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37576515</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37576515</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>For the alignment parameter I agree.</p>
]]></description><pubDate>Tue, 19 Sep 2023 20:45:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=37576284</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37576284</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37576284</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>Agreed. The question really is if you should demand the user to enforce that constraint on the size they pass to you, or if the function itself should signal an error in that case.</p>
]]></description><pubDate>Tue, 19 Sep 2023 18:51:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=37574483</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37574483</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37574483</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>Nice. Seems to work for case you mentioned under my comment: <a href="https://godbolt.org/z/TYorcd8b6" rel="nofollow noreferrer">https://godbolt.org/z/TYorcd8b6</a></p>
]]></description><pubDate>Tue, 19 Sep 2023 18:22:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=37574024</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37574024</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37574024</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>Interesting point. I modified my example to test what you described. I had to play with the compilation flags to get the allocs to not be optimized out and to not panic when the integer overflow happens, but otherwise I didn't change the logic.  I'm pretty sure my implementation is correctly handling the case you mention, evidenced by it returning a null pointer.<p>Link: <a href="https://godbolt.org/z/f1jGW6Pa3" rel="nofollow noreferrer">https://godbolt.org/z/f1jGW6Pa3</a><p>Update:
NVM, definitely not being handled correctly. <a href="https://godbolt.org/z/cMTe1o979" rel="nofollow noreferrer">https://godbolt.org/z/cMTe1o979</a></p>
]]></description><pubDate>Tue, 19 Sep 2023 18:03:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=37573754</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37573754</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37573754</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>Ok, I get it now. It would add an extra ptr to the struct, but wouldn't be significant overhead.<p>I do wonder what benefit there is for you over just having two separate allocators, one for long term and one for short term. I imagine there could be benefits in very memory constrained scenarios.</p>
]]></description><pubDate>Tue, 19 Sep 2023 17:38:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=37573395</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37573395</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37573395</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>This sounds like it would make the alloc logic much more complicated and branch-y, defeating the purpose of bumping down anyway, unless your implying some compile-time way to do this.</p>
]]></description><pubDate>Tue, 19 Sep 2023 17:09:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=37572997</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37572997</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37572997</guid></item><item><title><![CDATA[New comment by dev_dwarf in "Always Bump Downwards (2019)"]]></title><description><![CDATA[
<p>In the "bump up" version you could remove both the checked_add branches and replace them with a single check at the end, making the amount of branches the same.<p>Quick example: <a href="https://godbolt.org/z/rdv4qnrs8" rel="nofollow noreferrer">https://godbolt.org/z/rdv4qnrs8</a>.<p>*edited to update the example, realized I messed up the comparison logic.</p>
]]></description><pubDate>Tue, 19 Sep 2023 16:40:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=37572535</link><dc:creator>dev_dwarf</dc:creator><comments>https://news.ycombinator.com/item?id=37572535</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37572535</guid></item></channel></rss>