Memory Management in D: Request for Comment
BCS
none at anon.com
Wed Nov 4 09:16:21 PST 2009
Hello dsimcha,
> 3. This one is an order of magnitude less likely than the other two
> to actually get implemented, at least by me, but how about
> thread-local allocators so you can call malloc() without taking a
> lock? I vaguely remember Sean saying he was working on that a while
> back, but I never heard anything about it again. It's probably best
> to wait for shared to be implemented for this so that unshared objects
> can also be collected w/o stopping the world, but we should start at
> least discussing this now.
I think there are general malloc functions that are lock free. On the same
note, I've been toying with an idea for how to do memory heap structure that
would be totally lock free (think CAS) but has some downsides (like it won't
handle a non-continues memory space and expanding the memory could get very
expensive. Both of these could be non issues in some cases; short lived job
specific heaps, memory mapped (shared?) data(base) files, resource limited
systems, etc.
I've been meaning to get around to implementing it but never had time. I'd
be willing to collaborate or, if even that doesn't get me moving, just hand
over the whole project in exchange for a "coauthor" line in the comments.
More information about the Digitalmars-d
mailing list