From: Chris Thomasson on
"xushiwei" <xushiweizh(a)gmail.com> wrote in message
news:d21bda62-0079-4023-99ef-cc90c66b5831(a)q1g2000prf.googlegroups.com...
> To obtain a copy of this paper in pdf format click here (http://
> xushiwei.com/local--files/gc-allocator/GCAllocator.pdf or from google
> code: http://code.google.com/p/stdext/downloads/list). Another copy is
> also available on google docs (http://docs.google.com/View?
> docid=dds5zgx6_353dc5k4fcq) in html format.
[...]

AFAICT, your implementation is not thread-safe. For instance, I could not
use it to implement a producer/consumer pattern. Thread A allocates blocks
and passes them to thread B which frees them. Am I missing something?


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Chris Thomasson on
"xushiwei" <xushiweizh(a)gmail.com> wrote in message
news:d21bda62-0079-4023-99ef-cc90c66b5831(a)q1g2000prf.googlegroups.com...
> To obtain a copy of this paper in pdf format click here (http://
> xushiwei.com/local--files/gc-allocator/GCAllocator.pdf or from google
> code: http://code.google.com/p/stdext/downloads/list). Another copy is
> also available on google docs (http://docs.google.com/View?
> docid=dds5zgx6_353dc5k4fcq) in html format.
>
> Introduction
>
> Most of the C++ programmers do not benefit from "Garbage Collection"
> technique (GC). They are sick of deleting objects but have to do this.
> There are some C/C++ memory GC implementations, but they are complex
> and are not widely used.
[...]

I use C++ because it's at a low-enough level and does not have a GC. Anyway,
I need to take a look at your allocator. One question, can I allocate memory
in one thread and free it in another? Is your allocator algorithm wait-free,
or just lock-free? How does it compare to StreamFlow or Hoard? I am not
interested in the GC aspect, just the allocator. Also, can I use your GC to
solve the reader-writer problem in non-blocking algorithms? For instance,
could I substitute RCU with your GC?

Thanks.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Chris Thomasson on
"Chris Thomasson" <cristom(a)comcast.net> wrote in message
news:c4Odnch9beA_QJHVnZ2dnUVZ_viunZ2d(a)comcast.com...
> "xushiwei" <xushiweizh(a)gmail.com> wrote in message
> news:d21bda62-0079-4023-99ef-cc90c66b5831(a)q1g2000prf.googlegroups.com...
>> To obtain a copy of this paper in pdf format click here (http://
>> xushiwei.com/local--files/gc-allocator/GCAllocator.pdf or from google
>> code: http://code.google.com/p/stdext/downloads/list). Another copy is
>> also available on google docs (http://docs.google.com/View?
>> docid=dds5zgx6_353dc5k4fcq) in html format.
> [...]
>
> AFAICT, your implementation is not thread-safe. For instance, I could not
> use it to implement a producer/consumer pattern. Thread A allocates blocks
> and passes them to thread B which frees them. Am I missing something?

If I am correct, well, "perhaps" I have something that just might be able to
help your allocator. There is an invention that can transform most
single-threaded memory allocators into scaleable multi-threaded ones; here
is my initial post:

http://groups.google.com/group/comp.arch/browse_frm/thread/6dc825ec9999d3a8

basically, you create single-threaded allocator and plug it into the system,
then, boom, its multi-threaded. If you have any questions, feel free to fire
away...


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]