 DECLARE_UNITTEST(TestMalloc);
 
 
-thrust::pointer<void,my_system>
-  malloc(my_system &system, std::size_t)
+thrust::pointer<void,my_memory_system>
+  malloc(my_memory_system &system, std::size_t)
 {
   system.validate_dispatch();
 
-  return thrust::pointer<void,my_system>();
+  return thrust::pointer<void,my_memory_system>();
 }
 
 



template<typename T>
  thrust::pair<thrust::pointer<T,my_system>, std::ptrdiff_t>
    get_temporary_buffer(my_system &system, std::ptrdiff_t n)
{
  system.validate_dispatch();

  thrust::device_system_tag device_sys;
  thrust::pair<thrust::pointer<T, thrust::device_system_tag>, std::ptrdiff_t> result = thrust::get_temporary_buffer<T>(device_sys, n);
  return thrust::make_pair(thrust::pointer<T,my_system>(result.first.get()), result.second);
}





template<typename Pointer>
void free(my_memory_system &system, Pointer)
{
  system.validate_dispatch();
}
