Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-20 Thread Emanuel Peter
On Mon, 18 Dec 2023 22:48:18 GMT, Kim Barrett wrote: >> @eme64 Is it feasible to split this up to solve each of the problems you >> identify in stages? There is also overlap here with JDK-8319709 IIUC. Thanks. > >> @dholmes-ora These are the "parts": >> >> 1. initialize up to capacity vs l

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-19 Thread Emanuel Peter
On Fri, 1 Dec 2023 07:56:04 GMT, Emanuel Peter wrote: > Before this patch, we always initialized the GrowableArray up to its > `capacity`, and not just up to `length`. This is problematic for a few > reasons: > > - It is not expected. `std::vector` also only initializes the elements up to > i

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Emanuel Peter
On Mon, 18 Dec 2023 22:48:18 GMT, Kim Barrett wrote: >> @eme64 Is it feasible to split this up to solve each of the problems you >> identify in stages? There is also overlap here with JDK-8319709 IIUC. Thanks. > >> @dholmes-ora These are the "parts": >> >> 1. initialize up to capacity vs l

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread David Holmes
On Fri, 1 Dec 2023 07:56:04 GMT, Emanuel Peter wrote: > Before this patch, we always initialized the GrowableArray up to its > `capacity`, and not just up to `length`. This is problematic for a few > reasons: > > - It is not expected. `std::vector` also only initializes the elements up to > i

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Kim Barrett
On Fri, 1 Dec 2023 07:56:04 GMT, Emanuel Peter wrote: > Before this patch, we always initialized the GrowableArray up to its > `capacity`, and not just up to `length`. This is problematic for a few > reasons: > > - It is not expected. `std::vector` also only initializes the elements up to > i

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Kim Barrett
On Mon, 18 Dec 2023 07:49:04 GMT, David Holmes wrote: >> Before this patch, we always initialized the GrowableArray up to its >> `capacity`, and not just up to `length`. This is problematic for a few >> reasons: >> >> - It is not expected. `std::vector` also only initializes the elements up to

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-18 Thread Emanuel Peter
On Mon, 18 Dec 2023 07:49:04 GMT, David Holmes wrote: >> Before this patch, we always initialized the GrowableArray up to its >> `capacity`, and not just up to `length`. This is problematic for a few >> reasons: >> >> - It is not expected. `std::vector` also only initializes the elements up to

Re: RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-17 Thread David Holmes
On Fri, 1 Dec 2023 07:56:04 GMT, Emanuel Peter wrote: > Before this patch, we always initialized the GrowableArray up to its > `capacity`, and not just up to `length`. This is problematic for a few > reasons: > > - It is not expected. `std::vector` also only initializes the elements up to > i

RFR: 8319115: GrowableArray: Do not initialize up to capacity

2023-12-17 Thread Emanuel Peter
Before this patch, we always initialized the GrowableArray up to its `capacity`, and not just up to `length`. This is problematic for a few reasons: - It is not expected. `std::vector` also only initializes the elements up to its size, and not to capacity. - It requires a default-constructor for