< prev index next >

src/share/vm/gc/serial/defNewGeneration.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2015, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 373,383 **** int threads_count; size_t thread_increase_size = 0; // 1. Check an overflow at 'threads_count * NewSizeThreadIncrease'. threads_count = Threads::number_of_non_daemon_threads(); ! if (NewSizeThreadIncrease <= max_uintx / threads_count) { thread_increase_size = threads_count * NewSizeThreadIncrease; // 2. Check an overflow at 'new_size_candidate + thread_increase_size'. if (new_size_candidate <= max_uintx - thread_increase_size) { new_size_candidate += thread_increase_size; --- 373,383 ---- int threads_count; size_t thread_increase_size = 0; // 1. Check an overflow at 'threads_count * NewSizeThreadIncrease'. threads_count = Threads::number_of_non_daemon_threads(); ! if (threads_count > 0 && NewSizeThreadIncrease <= max_uintx / threads_count) { thread_increase_size = threads_count * NewSizeThreadIncrease; // 2. Check an overflow at 'new_size_candidate + thread_increase_size'. if (new_size_candidate <= max_uintx - thread_increase_size) { new_size_candidate += thread_increase_size;
< prev index next >