FAQ
Hi all,
I put together a proof of concept for a lock-free poor man's slab
allocator. Possibly useful when allocating insane amounts of small values.
Although, I have a feeling the slabs will hang around until the last
reference is dropped; which means big slabs of throw away values is out
since there is no recycling of slab slots.

https://github.com/fncodr/godbase/blob/master/poorslab/poorslab.go
https://github.com/fncodr/godbase/blob/master/poorslab/poorslab_test.go

Peace



--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Andreas Nilsson at Apr 9, 2016 at 10:18 am
    Update: Added a freelist to get slot recycling.

    Den lördag 9 april 2016 kl. 04:16:15 UTC+2 skrev Andreas Nilsson:
    Hi all,
    I put together a proof of concept for a lock-free poor man's slab
    allocator. Possibly useful when allocating insane amounts of small values.
    Although, I have a feeling the slabs will hang around until the last
    reference is dropped; which means big slabs of throw away values is out
    since there is no recycling of slab slots.

    https://github.com/fncodr/godbase/blob/master/poorslab/poorslab.go
    https://github.com/fncodr/godbase/blob/master/poorslab/poorslab_test.go

    Peace


    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Kevin Malachowski at Apr 9, 2016 at 11:44 pm
    Have you benchmarked it to compare it to the standard memory allocator for different allocation sizes?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 9, '16 at 2:16a
activeApr 9, '16 at 11:44p
posts3
users2
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase