 
 void TestFreeDispatchExplicit()
 {
-  thrust::pointer<my_system,void> ptr;
-
-  my_system sys(0);
+  thrust::pointer<my_memory_system,void> ptr;
+
+  my_memory_system sys(0);
   thrust::free(sys, ptr);
 
   ASSERT_EQUAL(true, sys.is_valid());

{
  using thrust::system::detail::generic::select_system;

  my_system my_sys(0);
  thrust::device_system_tag device_sys;

  // select_system(my_system, device_system_tag) should return device_system_tag (the minimum tag)

#include <thrust/sequence.h>
#include <thrust/reverse.h>

// Define a new system class, as the my_system one is already used with a thrust::sort template definition
// that calls back into sort.cu
class my_memory_system : public thrust::device_execution_policy<my_memory_system>
{
  public:
    my_memory_system(int)
      : correctly_dispatched(false),
        num_copies(0)
    {}

    my_memory_system(const my_memory_system &other)
      : correctly_dispatched(false),
        num_copies(other.num_copies + 1)
    {}

    void validate_dispatch()
    {
      correctly_dispatched = (num_copies == 0);
    }

    bool is_valid()
    {
      return correctly_dispatched;
    }

  private:
    bool correctly_dispatched;

    // count the number of copies so that we can validate
    // that dispatch does not introduce any
    unsigned int num_copies;


    // disallow default construction
    my_memory_system();
};


template<typename T1, typename T2>
bool are_same(const T1 &, const T2 &)
{
