On 10/28/12 9:03 AM, Bennie Kloosteman wrote:
AFAIK Azul  is propitiatory  and is not  fast  it makes a huge number of
small memory allocations and they make changes on linux to make i this
work rather than on specialized HW .. What is special though is the lack
of long GC pauses.

That said GCs are getting better the only real issues are
1,  GC pauses . Which makes  managing system memory eg for DMA / drivers
  tricky.
2 . Write performance , most GCs have a card table which halves memory
write performance.

In quite a few cases GC give better performance than malloc ( since
nursery allocations are just a compare / exchange pointer increment with
no concern for fragmentation)    and with GCs you can still create and
manage a static buffer pool if you need performance

For places where it matters (e.g. the binarytrees shootout benchmark) we have an arena type in the standard library that provides bump allocation.

Making memory pools without special language support isn't particularly safe; the code could incorrectly return an object to a pool and continue to hold on to it, creating in effect a dangling pointer. You really want a region system if you want memory pools to have the same safety guarantees as ordinary use of the garbage collector.

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to