  mem = block->m_water_level;
  if (((size_t)mem) & (alignment - 1)) {
    mem += (alignment - ((size_t)mem)) & (alignment - 1);
  }

  if ((block->m_heap_end >= mem) && (((size_t)block->m_heap_end - (size_t)mem) >= size)) {
    block->m_water_level = mem + size;
    return mem;
  }

  return nullptr;
}