| 503 | } |
| 504 | |
| 505 | void *Allocate(size_t num_bytes) { |
| 506 | auto it = t_bins_.find(num_bytes); |
| 507 | if (it != t_bins_.end()) { |
| 508 | return it->second->Allocate(); |
| 509 | } |
| 510 | auto b = new ThreadLocalBin<ChunkType>(num_bytes, page_map_, arena_); |
| 511 | t_bins_.emplace(num_bytes, b); |
| 512 | return b->Allocate(); |
| 513 | } |
| 514 | |
| 515 | size_t BatchAllocate(size_t num, size_t num_bytes, void **ret) { |
| 516 | auto it = t_bins_.find(num_bytes); |