used for values of any type with that size.
Fast -- It preallocates chunks of memory blocks and then give it
away instead of actual allocation.
gc support -- It supports standard golang's gc and free memory chunks when
all memory blocks of that chunk are not referenced anywhere(except memory
chunk itself), so you don't need C-style free(my_memory).
Is it possible to write something like that in golang? So far I came to
conclusion that such memory allocator could be written for particular type
with some special modifications of code(like simulating weakrefs with
https://groups.google.com/d/msg/golang-nuts/1ItNOOj8yW8/9xBlzy6DNKYJ ) so
functions that operate on that type must be rewritten to be aware of
embedded pointer(but I'm unsure on this method). Or such allocator could be
written, but with C-style 'free' function.
Am I wrong? Or do you have some ideas on topic(maybe some tricks using
runtime,unsafe or cgo)?
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 email@example.com.
For more options, visit https://groups.google.com/groups/opt_out.