![]() |
2014-11-06
, 12:30
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#2
|
![]() |
2014-11-06
, 12:39
|
|
Posts: 6,453 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#3
|
for (int i; i < 200MB; ++i) buffer[i] = fx(i);
![]() |
2014-11-06
, 12:45
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#4
|
It is a GUI app that, depending on settings, may want to fill up a large (200MB+) buffer with data generated at runtime. In pseudocode...
fx() can be quite a complex function and running it 200M times can take up to a few minutes.Code:for (int i; i < 200MB; ++i) buffer[i] = fx(i);
for (int i; i < 200MB; ++i) { if(i % 1000 == 0) sched_yield(); buffer[i] = fx(i); }
![]() |
2014-11-06
, 12:46
|
Posts: 324 |
Thanked: 739 times |
Joined on Jun 2009
@ São Paulo, Brazil
|
#5
|
It is a GUI app that, depending on settings, may want to fill up a large (200MB+) buffer with data generated at runtime. In pseudocode...
fx() can be quite a complex function and running it 200M times can take up to a few minutes.Code:for (int i; i < 200MB; ++i) buffer[i] = fx(i);
![]() |
2014-11-06
, 12:51
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#6
|
![]() |
2014-11-06
, 12:55
|
|
Posts: 6,453 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#7
|
The Following 3 Users Say Thank You to pichlo For This Useful Post: | ||
I assume there is a system call somewhere that I can call periodically to reset the watchdog. What is it?
Sorry if this is a silly question with an obvious answer. I must be particularly slow this morning. I just spent two hours searching and found nothing of relevance.
Русский военный корабль, иди нахуй!