"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-malloc.c" between
stress-ng-0.13.04.tar.xz and stress-ng-0.13.05.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

stress-malloc.c  (stress-ng-0.13.04.tar.xz):stress-malloc.c  (stress-ng-0.13.05.tar.xz)
skipping to change at line 137 skipping to change at line 137
static void stress_malloc_page_touch( static void stress_malloc_page_touch(
uint8_t *buffer, uint8_t *buffer,
const size_t size, const size_t size,
const size_t page_size) const size_t page_size)
{ {
if (malloc_touch) { if (malloc_touch) {
register uint8_t *ptr; register uint8_t *ptr;
const uint8_t *end = buffer + size; const uint8_t *end = buffer + size;
for (ptr = buffer; ptr < end; ptr += page_size) for (ptr = buffer; keep_stressing_flag() && (ptr < end); ptr += p age_size)
*ptr = 0xff; *ptr = 0xff;
} else { } else {
(void)stress_mincore_touch_pages_interruptible(buffer, size); (void)stress_mincore_touch_pages_interruptible(buffer, size);
} }
} }
/* /*
* stress_malloc_racy_count() * stress_malloc_racy_count()
* racy bogo op counter, we have a lot of contention * racy bogo op counter, we have a lot of contention
* if we lock the args->counter, so sum per-process * if we lock the args->counter, so sum per-process
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)