--- old/src/share/vm/gc/g1/ptrQueue.cpp 2016-02-19 10:53:33.649170793 -0500 +++ new/src/share/vm/gc/g1/ptrQueue.cpp 2016-02-19 10:53:33.185144701 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -109,8 +109,8 @@ void PtrQueueSet::initialize(Monitor* cbl_mon, Mutex* fl_lock, - int process_completed_threshold, - int max_completed_queue, + size_t process_completed_threshold, + size_t max_completed_queue, PtrQueueSet *fl_owner) { _max_completed_queue = max_completed_queue; _process_completed_threshold = process_completed_threshold; @@ -248,17 +248,18 @@ } _n_completed_buffers++; - if (!_process_completed && _process_completed_threshold >= 0 && + if (!_process_completed && _n_completed_buffers >= _process_completed_threshold) { _process_completed = true; - if (_notify_when_complete) + if (_notify_when_complete) { _cbl_mon->notify(); + } } DEBUG_ONLY(assert_completed_buffer_list_len_correct_locked()); } -int PtrQueueSet::completed_buffers_list_length() { - int n = 0; +size_t PtrQueueSet::completed_buffers_list_length() { + size_t n = 0; BufferNode* cbn = _completed_buffers_head; while (cbn != NULL) { n++;