| 63 | // Allocate a new object with an argument. |
| 64 | template <typename... Args> |
| 65 | Object* alloc(Args... args) |
| 66 | { |
| 67 | Object* o = free_list_; |
| 68 | if (o) |
| 69 | free_list_ = free_list_->next_; |
| 70 | else |
| 71 | o = allocate_object<Object>(allocator_, args...); |
| 72 | |
| 73 | o->next_ = live_list_; |
| 74 | o->prev_ = 0; |
| 75 | if (live_list_) |
| 76 | live_list_->prev_ = o; |
| 77 | live_list_ = o; |
| 78 | |
| 79 | return o; |
| 80 | } |
| 81 | |
| 82 | // Free an object. Moves it to the free list. No destructors are run. |
| 83 | void free(Object* o) |
nothing calls this directly
no outgoing calls
no test coverage detected