CUDPP Memory Corruption Error

I just wanna use cuda hash table as cudpp. So I wrote the code using cudpp api. But it is showing memory corruption error. All other cuda programs are running well. I dont know what to do with this. What is the actual problem here? How can I solve this?

const int leftSize = 1000;

using namespace std;

void check(void)
{
  
        cout<< "Start" << endl;

   		unsigned * keys = new unsigned;
		unsigned * values = new unsigned;
	    unsigned * dkeys = NULL;
	 	unsigned * dvalues = NULL;

	 	cudaMalloc((void**) &dkeys, sizeof(unsigned) * leftSize);
	 	cudaMalloc((void**) &dvalues, sizeof(unsigned) * leftSize);

 		cudaMemcpy(dkeys, keys, sizeof(unsigned) * leftSize, cudaMemcpyHostToDevice);
		cudaMemcpy(dvalues, values, sizeof(unsigned) * leftSize, cudaMemcpyHostToDevice);

		cout<<"Over"<< endl;

	    CUDPPHashTableConfig config;
 		config.type = CUDPP_BASIC_HASH_TABLE;
 		config.kInputSize = leftSize;
 		config.space_usage = 1.5;

 		CUDPPHandle theCudpp;
 		CUDPPResult result = cudppCreate(&theCudpp);
 		if(result!=CUDPP_SUCCESS) std::cout<<"\nError at Handle";

 		CUDPPHandle hashTableHandle;
 		result = cudppHashTable(theCudpp, &hashTableHandle, &config);
 		if(result!=CUDPP_SUCCESS) std::cout<<"\nError at HashAlloc";

 		cout<< "End" << endl;

 		result = cudppHashInsert(hashTableHandle, dkeys, dvalues, leftSize);
		if(result!=CUDPP_SUCCESS) std::cout<<"\nError at Hash"<<endl;

		cout<<"Over2"<< endl;
}

OUTPUT:

Start
Over
*** Error in `/home/sas/cuda-workspace/Queries/Release/Queries': malloc(): memory corruption: 0x000000000744c920 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f8d3f9067e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8181e)[0x7f8d3f91081e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f8d3f9125d4]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_Znwm+0x18)[0x7f8d40204e78]
/home/sas/cuda-workspace/Queries/Release/Queries[0x404393]
/home/sas/cuda-workspace/Queries/Release/Queries[0x403f36]
/home/sas/cuda-workspace/Queries/Release/Queries[0x403629]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f8d3f8af830]
/home/sas/cuda-workspace/Queries/Release/Queries[0x403c39]
======= Memory map: ========
00400000-029f4000 r-xp 00000000 08:05 10886941                           /home/sas/cuda-workspace/Queries/Release/Queries
02bf3000-02bf4000 r--p 025f3000 08:05 10886941                           /home/sas/cuda-workspace/Queries/Release/Queries
02bf4000-02bf5000 rw-p 025f4000 08:05 10886941                           /home/sas/cuda-workspace/Queries/Release/Queries
02bf5000-02c00000 rw-p 00000000 00:00 0 
04742000-50fdd000 rw-p 00000000 00:00 0                                  [heap]
200000000-200100000 rw-s 3e0c14000 00:06 529                             /dev/nvidiactl
200100000-200104000 rw-s 3a6a16000 00:06 529                             /dev/nvidiactl
200104000-200120000 ---p 00000000 00:00 0 
200120000-200520000 rw-s 414dd6000 00:06 529                             /dev/nvidiactl
200520000-200524000 rw-s 3e1ccb000 00:06 529                             /dev/nvidiactl
200524000-200540000 ---p 00000000 00:00 0 
200540000-200940000 rw-s 3e1523000 00:06 529                             /dev/nvidiactl
200940000-200944000 rw-s 3e23fe000 00:06 529                             /dev/nvidiactl
200944000-200960000 ---p 00000000 00:00 0 
200960000-200d60000 rw-s 3466ba000 00:06 529                             /dev/nvidiactl
200d60000-200d64000 rw-s 17a770000 00:06 529                             /dev/nvidiactl
200d64000-200d80000 ---p 00000000 00:00 0 
200d80000-201180000 rw-s 17a774000 00:06 529                             /dev/nvidiactl
201180000-201184000 rw-s 3e1fa7000 00:06 529                             /dev/nvidiactl
201184000-2011a0000 ---p 00000000 00:00 0 
2011a0000-2015a0000 rw-s 3e1af3000 00:06 529                             /dev/nvidiactl
2015a0000-2015a4000 rw-s 3d6c2e000 00:06 529                             /dev/nvidiactl
2015a4000-2015c0000 ---p 00000000 00:00 0 
2015c0000-2019c0000 rw-s 3e52e2000 00:06 529                             /dev/nvidiactl
2019c0000-2019c4000 rw-s 2ba65d000 00:06 529                             /dev/nvidiactl
2019c4000-2019e0000 ---p 00000000 00:00 0 
2019e0000-201de0000 rw-s 3e3d71000 00:06 529                             /dev/nvidiactl
201de0000-201de4000 rw-s 3e0ebf000 00:06 529                             /dev/nvidiactl
201de4000-201e00000 ---p 00000000 00:00 0 
201e00000-202200000 rw-s 3e2596000 00:06 529                             /dev/nvidiactl
202200000-202204000 rw-s 3e1ee2000 00:06 529                             /dev/nvidiactl
202204000-202220000 ---p 00000000 00:00 0 
202220000-202620000 rw-s 3f6de7000 00:06 529                             /dev/nvidiactl
202620000-202624000 rw-s 3b1a5a000 00:06 529                             /dev/nvidiactl
202624000-202640000 ---p 00000000 00:00 0 
202640000-202a40000 rw-s 3e1d76000 00:06 529                             /dev/nvidiactl
202a40000-202a44000 rw-s 3e0e38000 00:06 529                             /dev/nvidiactl
202a44000-202a60000 ---p 00000000 00:00 0 
202a60000-202e60000 rw-s 449c51000 00:06 529                             /dev/nvidiactl
202e60000-202e64000 rw-s 3dad07000 00:06 529                             /dev/nvidiactl
202e64000-202e80000 ---p 00000000 00:00 0 
202e80000-203280000 rw-s 3b1b44000 00:06 529                             /dev/nvidiactl
203280000-203284000 rw-s 3e26cf000 00:06 529                             /dev/nvidiactl
203284000-2032a0000 ---p 00000000 00:00 0 
2032a0000-2036a0000 rw-s 3e26db000 00:06 529                             /dev/nvidiactl
2036a0000-2036a4000 rw-s 3a6a56000 00:06 529                             /dev/nvidiactl
2036a4000-2036c0000 ---p 00000000 00:00 0 
2036c0000-203ac0000 rw-s 3e1a82000 00:06 529                             /dev/nvidiactl
203ac0000-203ac4000 rw-s 3e0b8e000 00:06 529                             /dev/nvidiactl
203ac4000-203ae0000 ---p 00000000 00:00 0 
203ae0000-203ee0000 rw-s 3e0b9a000 00:06 529                             /dev/nvidiactl
203ee0000-203ee4000 rw-s 3e4b88000 00:06 529                             /dev/nvidiactl
203ee4000-203f00000 ---p 00000000 00:00 0 
203f00000-204300000 rw-s 3e4b94000 00:06 529                             /dev/nvidiactl
204300000-204400000 rw-s 3e1482000 00:06 529                             /dev/nvidiactl
204400000-204500000 rw-s 3e7cd8000 00:06 529                             /dev/nvidiactl
204500000-204600000 rw-s 40377c000 00:06 529                             /dev/nvidiactl
204600000-204700000 rw-s 3b377e000 00:06 529                             /dev/nvidiactl
204700000-204800000 rw-s 3d6ce1000 00:06 529                             /dev/nvidiactl
204800000-2048e0000 rw-s 3e7f65000 00:06 529                             /dev/nvidiactl
2048e0000-2049e0000 rw-s 00000000 00:05 30621                            /dev/zero (deleted)
2049e0000-b00000000 ---p 00000000 00:00 0 
7f8d30000000-7f8d30021000 rw-p 00000000 00:00 0 
7f8d30021000-7f8d34000000 ---p 00000000 00:00 0 
7f8d34000000-7f8d34021000 rw-p 00000000 00:00 0 
7f8d34021000-7f8d38000000 ---p 00000000 00:00 0 
7f8d38000000-7f8d38021000 rw-p 00000000 00:00 0 
7f8d38021000-7f8d3c000000 ---p 00000000 00:00 0 
7f8d3c369000-7f8d3cb33000 r-xp 00000000 08:01 5248339                    /usr/lib/nvidia-367/libnvidia-ptxjitcompiler.so.367.57
7f8d3cb33000-7f8d3cd32000 ---p 007ca000 08:01 5248339                    /usr/lib/nvidia-367/libnvidia-ptxjitcompiler.so.367.57
7f8d3cd32000-7f8d3ce27000 rw-p 007c9000 08:01 5248339                    /usr/lib/nvidia-367/libnvidia-ptxjitcompiler.so.367.57
7f8d3ce27000-7f8d3ce30000 rw-p 00000000 00:00 0 
7f8d3ce30000-7f8d3ce31000 ---p 00000000 00:00 0 
7f8d3ce31000-7f8d3d631000 rw-p 00000000 00:00 0 
7f8d3d631000-7f8d3d632000 ---p 00000000 00:00 0 
7f8d3d632000-7f8d3de32000 rw-p 00000000 00:00 0 
7f8d3de32000-7f8d3de33000 ---p 00000000 00:00 0 
7f8d3de33000-7f8d3e633000 rw-p 00000000 00:00 0 
7f8d3e633000-7f8d3e677000 r-xp 00000000 08:01 5248348                    /usr/lib/nvidia-367/libnvidia-fatbinaryloader.so.367.57
7f8d3e677000-7f8d3e877000 ---p 00044000 08:01 5248348                    /usr/lib/nvidia-367/libnvidia-fatbinaryloader.so.367.57
7f8d3e877000-7f8d3e881000 rw-p 00044000 08:01 5248348                    /usr/lib/nvidia-367/libnvidia-fatbinaryloader.so.367.57
7f8d3e881000-7f8d3ef3f000 r-xp 00000000 08:01 4985182                    /usr/lib/x86_64-linux-gnu/libcuda.so.367.57
7f8d3ef3f000-7f8d3f13e000 ---p 006be000 08:01 4985182                    /usr/lib/x86_64-linux-gnu/libcuda.so.367.57
7f8d3f13e000-7f8d3f25a000 rw-p 006bd000 08:01 4985182                    /usr/lib/x86_64-linux-gnu/libcuda.so.367.57
7f8d3f25a000-7f8d3f266000 rw-p 00000000 00:00 0 
7f8d3f266000-7f8d3f26d000 r-xp 00000000 08:01 14155861                   /lib/x86_64-linux-gnu/librt-2.23.so
7f8d3f26d000-7f8d3f46c000 ---p 00007000 08:01 14155861                   /lib/x86_64-linux-gnu/librt-2.23.so
7f8d3f46c000-7f8d3f46d000 r--p 00006000 08:01 14155861                   /lib/x86_64-linux-gnu/librt-2.23.so
7f8d3f46d000-7f8d3f46e000 rw-p 00007000 08:01 14155861                   /lib/x86_64-linux-gnu/librt-2.23.so
7f8d3f46e000-7f8d3f486000 r-xp 00000000 08:01 14155872                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7f8d3f486000-7f8d3f685000 ---p 00018000 08:01 14155872                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7f8d3f685000-7f8d3f686000 r--p 00017000 08:01 14155872                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7f8d3f686000-7f8d3f687000 rw-p 00018000 08:01 14155872                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7f8d3f687000-7f8d3f68b000 rw-p 00000000 00:00 0 
7f8d3f68b000-7f8d3f68e000 r-xp 00000000 08:01 14155865                   /lib/x86_64-linux-gnu/libdl-2.23.so
7f8d3f68e000-7f8d3f88d000 ---p 00003000 08:01 14155865                   /lib/x86_64-linux-gnu/libdl-2.23.so
7f8d3f88d000-7f8d3f88e000 r--p 00002000 08:01 14155865                   /lib/x86_64-linux-gnu/libdl-2.23.so
7f8d3f88e000-7f8d3f88f000 rw-p 00003000 08:01 14155865                   /lib/x86_64-linux-gnu/libdl-2.23.so
7f8d3f88f000-7f8d3fa4e000 r-xp 00000000 08:01 14155866                   /lib/x86_64-linux-gnu/libc-2.23.so
7f8d3fa4e000-7f8d3fc4e000 ---p 001bf000 08:01 14155866                   /lib/x86_64-linux-gnu/libc-2.23.so
7f8d3fc4e000-7f8d3fc52000 r--p 001bf000 08:01 14155866                   /lib/x86_64-linux-gnu/libc-2.23.so
7f8d3fc52000-7f8d3fc54000 rw-p 001c3000 08:01 14155866                   /lib/x86_64-linux-gnu/libc-2.23.so
7f8d3fc54000-7f8d3fc58000 rw-p 00000000 00:00 0 
7f8d3fc58000-7f8d3fc6e000 r-xp 00000000 08:01 14160280                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7f8d3fc6e000-7f8d3fe6d000 ---p 00016000 08:01 14160280                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7f8d3fe6d000-7f8d3fe6e000 rw-p 00015000 08:01 14160280                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7f8d3fe6e000-7f8d3ff76000 r-xp 00000000 08:01 14155871                   /lib/x86_64-linux-gnu/libm-2.23.so
7f8d3ff76000-7f8d40175000 ---p 00108000 08:01 14155871                   /lib/x86_64-linux-gnu/libm-2.23.so
7f8d40175000-7f8d40176000 r--p 00107000 08:01 14155871                   /lib/x86_64-linux-gnu/libm-2.23.so
7f8d40176000-7f8d40177000 rw-p 00108000 08:01 14155871                   /lib/x86_64-linux-gnu/libm-2.23.so
7f8d40177000-7f8d402e9000 r-xp 00000000 08:01 4982913                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f8d402e9000-7f8d404e9000 ---p 00172000 08:01 4982913                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f8d404e9000-7f8d404f3000 r--p 00172000 08:01 4982913                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f8d404f3000-7f8d404f5000 rw-p 0017c000 08:01 4982913                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7f8d404f5000-7f8d404f9000 rw-p 00000000 00:00 0 
7f8d404f9000-7f8d4055b000 r-xp 00000000 08:01 5248051                    /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudart.so.8.0.44
7f8d4055b000-7f8d4075b000 ---p 00062000 08:01 5248051                    /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudart.so.8.0.44
7f8d4075b000-7f8d4075e000 rw-p 00062000 08:01 5248051                    /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudart.so.8.0.44
7f8d4075e000-7f8d4075f000 rw-p 00000000 00:00 0 
7f8d4075f000-7f8d40785000 r-xp 00000000 08:01 14155781                   /lib/x86_64-linux-gnu/ld-2.23.so
7f8d408a7000-7f8d40912000 rw-p 00000000 00:00 0 
7f8d40912000-7f8d40913000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d40913000-7f8d40914000 rw-s 3e3c3e000 00:06 529                       /dev/nvidiactl
7f8d40914000-7f8d40915000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d40915000-7f8d40916000 rw-s 3e4b87000 00:06 529                       /dev/nvidiactl
7f8d40916000-7f8d40917000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d40917000-7f8d40918000 rw-s 3e0b8c000 00:06 529                       /dev/nvidiactl
7f8d40918000-7f8d40919000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d40919000-7f8d4091a000 rw-s 3a6a55000 00:06 529                       /dev/nvidiactl
7f8d4091a000-7f8d4091b000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d4091b000-7f8d4091c000 rw-s 3e26ce000 00:06 529                       /dev/nvidiactl
7f8d4091c000-7f8d4091d000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d4091d000-7f8d4091e000 rw-s 3dad06000 00:06 529                       /dev/nvidiactl
7f8d4091e000-7f8d4091f000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d4091f000-7f8d40920000 rw-s 3e4be0000 00:06 529                       /dev/nvidiactl
7f8d40920000-7f8d40921000 rw-s efde5000 00:06 530                        /dev/nvidia0
7f8d40921000-7f8d40922000 rw-s 3b1a59000 00:06 529                       /dev/nvidiactl
7f8d40922000-7f8d40923000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d40923000-7f8d40924000 rw-s 3e23c2000 00:06 529                       /dev/nvidiactl
7f8d40924000-7f8d40925000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d40925000-7f8d40926000 rw-s 3e0ebe000 00:06 529                       /dev/nvidiactl
7f8d40926000-7f8d40927000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d40927000-7f8d40928000 rw-s 2ba65c000 00:06 529                       /dev/nvidiactl
7f8d40928000-7f8d40929000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d40929000-7f8d4092a000 rw-s 3d6c2d000 00:06 529                       /dev/nvidiactl
7f8d4092a000-7f8d4092b000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d4092b000-7f8d4092c000 rw-s 3e1fa6000 00:06 529                       /dev/nvidiactl
7f8d4092c000-7f8d4092d000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d4092d000-7f8d4092e000 rw-s 3b3757000 00:06 529                       /dev/nvidiactl
7f8d4092e000-7f8d4092f000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d4092f000-7f8d40930000 rw-s 3e23fd000 00:06 529                       /dev/nvidiactl
7f8d40930000-7f8d40931000 rw-s efde4000 00:06 530                        /dev/nvidia0
7f8d40931000-7f8d40932000 rw-s 3e1cca000 00:06 529                       /dev/nvidiactl
7f8d40932000-7f8d40982000 rw-p 00000000 00:00 0 
7f8d40982000-7f8d40984000 rw-p 00000000 00:00 0 
7f8d40984000-7f8d40985000 r--p 00025000 08:01 14155781                   /lib/x86_64-linux-gnu/ld-2.23.so
7f8d40985000-7f8d40986000 rw-p 00026000 08:01 14155781                   /lib/x86_64-linux-gnu/ld-2.23.so
7f8d40986000-7f8d40987000 rw-p 00000000 00:00 0 
7fff643ea000-7fff6440b000 rw-p 00000000 00:00 0                          [stack]
7fff64592000-7fff64594000 r--p 00000000 00:00 0                          [vvar]
7fff64594000-7fff64596000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]