J
Joseph
Environment: Linux C program (gcc), on linux kernel 2.6.16
Is there any function I can put inside a tight loop in order to make
the process a little nicer. In that it will give at least the CPU
temporarily back to the OS so that it doesn't seem like the current
program is consuming 50% of cpu resource?
The said loop had to process 32 million records in an structure array
in memory, and when it goes into this loop. Well the system seems to
freeze. The original programmer/designer had long left the company.
We want to touch this piece of code as little as possible due to
time/resource constraint. Thanks.
Is there any function I can put inside a tight loop in order to make
the process a little nicer. In that it will give at least the CPU
temporarily back to the OS so that it doesn't seem like the current
program is consuming 50% of cpu resource?
The said loop had to process 32 million records in an structure array
in memory, and when it goes into this loop. Well the system seems to
freeze. The original programmer/designer had long left the company.
We want to touch this piece of code as little as possible due to
time/resource constraint. Thanks.