loki

How do I use Loki's small object allocator?

穿精又带淫゛_ 提交于 2019-12-01 11:29:19
I need to use Loki's small object allocator but I am very confused as to how it works. I've read the documentation and lots of forums but it doesnt make sense: some of them say to use the stl, others use custom allocators. I just need to be able to test its performance with allocating and deallocating objects of different sizes. Could someone please provide a small example of how to use it? If you visit the Loki project,you might don't want to use SmallObject.It runs slower than default new.I don't know why,but some guys talked here: http://sourceforge.net/projects/loki-lib/forums/forum/93009

How do I use Loki's small object allocator?

余生颓废 提交于 2019-12-01 09:09:43
问题 I need to use Loki's small object allocator but I am very confused as to how it works. I've read the documentation and lots of forums but it doesnt make sense: some of them say to use the stl, others use custom allocators. I just need to be able to test its performance with allocating and deallocating objects of different sizes. Could someone please provide a small example of how to use it? 回答1: If you visit the Loki project,you might don't want to use SmallObject.It runs slower than default