File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -29,20 +29,24 @@ disjoint_params_unique_handle_t poolConfig() {
29
29
res = umfDisjointPoolParamsSetSlabMinSize (config,
30
30
DEFAULT_DISJOINT_SLAB_MIN_SIZE);
31
31
if (res != UMF_RESULT_SUCCESS) {
32
+ umfDisjointPoolParamsDestroy (config);
32
33
throw std::runtime_error (" Failed to set slab min size" );
33
34
}
34
35
res = umfDisjointPoolParamsSetMaxPoolableSize (
35
36
config, DEFAULT_DISJOINT_MAX_POOLABLE_SIZE);
36
37
if (res != UMF_RESULT_SUCCESS) {
38
+ umfDisjointPoolParamsDestroy (config);
37
39
throw std::runtime_error (" Failed to set max poolable size" );
38
40
}
39
41
res = umfDisjointPoolParamsSetCapacity (config, DEFAULT_DISJOINT_CAPACITY);
40
42
if (res != UMF_RESULT_SUCCESS) {
43
+ umfDisjointPoolParamsDestroy (config);
41
44
throw std::runtime_error (" Failed to set capacity" );
42
45
}
43
46
res = umfDisjointPoolParamsSetMinBucketSize (
44
47
config, DEFAULT_DISJOINT_MIN_BUCKET_SIZE);
45
48
if (res != UMF_RESULT_SUCCESS) {
49
+ umfDisjointPoolParamsDestroy (config);
46
50
throw std::runtime_error (" Failed to set min bucket size" );
47
51
}
48
52
Original file line number Diff line number Diff line change @@ -441,18 +441,22 @@ disjoint_params_unique_handle_t disjointPoolParams() {
441
441
}
442
442
res = umfDisjointPoolParamsSetSlabMinSize (params, 4096 );
443
443
if (res != UMF_RESULT_SUCCESS) {
444
+ umfDisjointPoolParamsDestroy (params);
444
445
throw std::runtime_error (" Failed to set slab min size" );
445
446
}
446
447
res = umfDisjointPoolParamsSetMaxPoolableSize (params, 4096 );
447
448
if (res != UMF_RESULT_SUCCESS) {
449
+ umfDisjointPoolParamsDestroy (params);
448
450
throw std::runtime_error (" Failed to set max poolable size" );
449
451
}
450
452
res = umfDisjointPoolParamsSetCapacity (params, 4 );
451
453
if (res != UMF_RESULT_SUCCESS) {
454
+ umfDisjointPoolParamsDestroy (params);
452
455
throw std::runtime_error (" Failed to set capacity" );
453
456
}
454
457
res = umfDisjointPoolParamsSetMinBucketSize (params, 64 );
455
458
if (res != UMF_RESULT_SUCCESS) {
459
+ umfDisjointPoolParamsDestroy (params);
456
460
throw std::runtime_error (" Failed to set min bucket size" );
457
461
}
458
462
You can’t perform that action at this time.
0 commit comments