#ifndef OS_STL_MYALOC_H #define OS_STL_MYALOC_H #include template class os_my_allocator : public os_allocator { typedef size_t size_type; public: // ********** allocation ********** // Return a pointer to raw memory for n_ objects of type T. The // objects should be constructed using the in-place new operator // after this function is called. /* virtual */ T* allocate (size_type n_) { T* tmp = ::allocate ((difference_type) n_, (T*) 0); cout << "allocate " << n_ << " objects @ " << tmp << endl; return tmp; } // Return a pointer to raw memory for n_ pointers to objects of // type T. /* virtual */ T** allocate_ptrs (size_type n_) { T** tmp = ::allocate ((difference_type) n_, (T**) 0); cout << "allocate " << n_ << " pointers @ " << tmp << endl; return tmp; } #ifdef OS_NO_DESTROY // This function is only necessary if your compiler does not // support templatized destructors. Return a pointer to n_ // objects of type T. /* virtual */ T* construct_array (size_type n_) { T* tmp = new T [n_]; cout << "construct array of "<