<commit_before>#pragma once

#include <glog/logging.h>

namespace Grappa {

  template<typename Base>
  class PoolAllocator {
    char * buffer;
    size_t buffer_size;
    size_t allocated;
  protected:
    Base* allocate(size_t sz) {
      LOG(ERROR) << "allocating " << sz;
      Base* p = reinterpret_cast<Base*>(buffer+allocated);
      allocated += sz;
      
      // TODO: implement heap allocation fallback
      CHECK(allocated <= buffer_size) << "PoolAllocator overflow: tried allocating " << sz << ", already allocated " << allocated << " of " << buffer_size;<commit_msg>Fix: use DVLOG for log message in PoolAllocator.<commit_after>#pragma once

#include <glog/logging.h>

namespace Grappa {

  template<typename Base>
  class PoolAllocator {
    char * buffer;
    size_t buffer_size;
    size_t allocated;
  protected:
    Base* allocate(size_t sz) {
      DVLOG(4) << "allocating " << sz;
      Base* p = reinterpret_cast<Base*>(buffer+allocated);
      allocated += sz;
      
      // TODO: implement heap allocation fallback
      CHECK(allocated <= buffer_size) << "PoolAllocator overflow: tried allocating " << sz << ", already allocated " << allocated << " of " << buffer_size;
{'fraction_non_alphanumeric': 0.12010008340283569, 'fraction_numerical': 0.0008340283569641367, 'mean_word_length': 3.3956043956043955, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6404607', 'n_tokens_mistral': 359, 'n_tokens_neox': 355, 'n_words': 96}