23
23
MachThreads () = default ;
24
24
25
25
~MachThreads () {
26
- kern_return_t kernel_return_code = vm_deallocate (
26
+ [[maybe_unused]] kern_return_t kernel_return_code = vm_deallocate (
27
27
mach_task_self (), reinterpret_cast <vm_offset_t >(threads), thread_count * sizeof (thread_t ));
28
- FML_CHECK (kernel_return_code == KERN_SUCCESS) << " Failed to deallocate thread infos." ;
28
+ FML_DCHECK (kernel_return_code == KERN_SUCCESS) << " Failed to deallocate thread infos." ;
29
29
}
30
30
31
31
private:
@@ -165,8 +165,6 @@ void DeleteIO(io_object_t value) {
165
165
kernel_return_code =
166
166
task_threads (mach_task_self (), &mach_threads.threads , &mach_threads.thread_count );
167
167
if (kernel_return_code != KERN_SUCCESS) {
168
- FML_LOG (ERROR) << " Error retrieving task information: "
169
- << mach_error_string (kernel_return_code);
170
168
return std::nullopt;
171
169
}
172
170
@@ -203,8 +201,6 @@ void DeleteIO(io_object_t value) {
203
201
num_threads--;
204
202
break ;
205
203
default :
206
- FML_LOG (ERROR) << " Error retrieving thread information: "
207
- << mach_error_string (kernel_return_code);
208
204
return std::nullopt;
209
205
}
210
206
}
@@ -223,8 +219,6 @@ void DeleteIO(io_object_t value) {
223
219
task_info (mach_task_self (), TASK_VM_INFO, reinterpret_cast <task_info_t >(&task_memory_info),
224
220
&task_memory_info_count);
225
221
if (kernel_return_code != KERN_SUCCESS) {
226
- FML_LOG (ERROR) << " Error retrieving task memory information: "
227
- << mach_error_string (kernel_return_code);
228
222
return std::nullopt;
229
223
}
230
224
0 commit comments