 
   void deallocate(void *ptr)
   {
-    // XXX omp critical will have to do in the absence of std::mutex
+    // XXX omp critical will have to do in the absence of std::mutex or thread_local below
+    #if _OPENMP
     #pragma omp critical
+    #endif // _OPENMP
     {
       // erase the allocated block from the allocated blocks map
       allocated_blocks_type::iterator iter = allocated_blocks.find(ptr);



// the cache is simply a global variable
cached_allocator g_allocator;



  {
    void *result = 0;

    // XXX omp critical will have to do in the absence of std::mutex or thread_local below
    #if _OPENMP
    #pragma omp critical
    #endif // _OPENMP
    {
      // search the cache for a free block
      free_blocks_type::iterator free_block = free_blocks.find(num_bytes);
