ECR #333755 - Fixed a possible memory leak problem which causes program crash.
[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1133822]
This commit is contained in:
@@ -175,6 +175,7 @@ double HSA_TEST::Run(int dim, int group_x, int group_y, int group_z, int s_size,
|
||||
check(Finding a kernarg memory region, err);
|
||||
void* local_kernel_arg_buffer = NULL;
|
||||
|
||||
|
||||
//size_t local_kernel_arg_buffer_size;
|
||||
//hsa_executable_symbol_get_info(kernelSymbol, HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE, &local_kernel_arg_buffer_size);
|
||||
|
||||
@@ -190,9 +191,8 @@ double HSA_TEST::Run(int dim, int group_x, int group_y, int group_z, int s_size,
|
||||
/*
|
||||
* Register the memory region for the argument buffer.
|
||||
*/
|
||||
err = hsa_memory_register(kernel_args, kernel_args_size);
|
||||
|
||||
check(Registering the argument buffer, err);
|
||||
//err = hsa_memory_register(kernel_args, kernel_args_size); ////////////////????????????????????
|
||||
//check(Registering the argument buffer, err); /////////////???????????????
|
||||
|
||||
/*
|
||||
* Obtain the current queue write index.
|
||||
@@ -229,6 +229,9 @@ double HSA_TEST::Run(int dim, int group_x, int group_y, int group_z, int s_size,
|
||||
* Cleanup all allocated resources.
|
||||
*/
|
||||
|
||||
err = hsa_memory_free(local_kernel_arg_buffer);
|
||||
check(Deallocate memory, err);
|
||||
|
||||
err=hsa_signal_destroy(local_signal);
|
||||
check(Destroying the local_signal, err);
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user