rho-devel / rho

GNU General Public License v2.0
133 stars 23 forks source link

Add BlockPool allocator for GCNode allocation #106

Closed llbit closed 8 years ago

llbit commented 8 years ago

This replaces the use of BDWGC for allocating GCNodes. The BlockPool allocator allocates small objects in an arena, this speeds up allocation and pointer lookup for scalars.

codecov-io commented 8 years ago

Current coverage is 70.16% (diff: 87.37%)

Merging #106 into master will increase coverage by 0.08%

@@             master       #106   diff @@
==========================================
  Files           491        498     +7   
  Lines         95721      96209   +488   
  Methods        5869       5920    +51   
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          67087      67506   +419   
- Misses        28634      28703    +69   
  Partials          0          0          

Powered by Codecov. Last update 3994c7e...2b5f392

kmillar commented 8 years ago

Please add your unit tests under tests/rho

llbit commented 8 years ago

@kmillar Thank you for all the comments so far! I added unit tests and addressed your comments in the latest commit.

I decided not to use boost::intrusive::slist yet, because I did not find a way to integrate it with the quarantine freelist. Do you have an idea how I might get around the Address Sanitizer poisoned freelist with intrusive list? The only idea I have is that the intrusive list part of the freelist could be kept unpoisoned.

ArunChauhan commented 8 years ago

Your code uses the "const" qualifier on methods (which is good), but it is not used consistently. I suggest going over your code once to mark all the const methods. It helps the compiler optimize the methods.

llbit commented 8 years ago

@kmillar I can rebase this into one commit if it helps. I avoided doing that so far so that the old comments would not disappear.