< prev index next >

src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp

Print this page

        

*** 249,259 **** } virtual void work(uint worker_id) { size_t const actual_chunk_size = MAX2(chunk_size(), _page_size); while (true) { ! char* touch_addr = (char*)Atomic::add_ptr((intptr_t)actual_chunk_size, (volatile void*) &_cur_addr) - actual_chunk_size; if (touch_addr < _start_addr || touch_addr >= _end_addr) { break; } char* end_addr = touch_addr + MIN2(actual_chunk_size, pointer_delta(_end_addr, touch_addr, sizeof(char))); os::pretouch_memory(touch_addr, end_addr, _page_size); --- 249,259 ---- } virtual void work(uint worker_id) { size_t const actual_chunk_size = MAX2(chunk_size(), _page_size); while (true) { ! char* touch_addr = Atomic::add(actual_chunk_size, &_cur_addr) - actual_chunk_size; if (touch_addr < _start_addr || touch_addr >= _end_addr) { break; } char* end_addr = touch_addr + MIN2(actual_chunk_size, pointer_delta(_end_addr, touch_addr, sizeof(char))); os::pretouch_memory(touch_addr, end_addr, _page_size);
< prev index next >