Ryan Liptak 959d227d13 ArgIteratorWindows: Reduce allocated memory by parsing the WTF-16 string directly
Before this commit, the WTF-16 command line string would be converted to WTF-8 in `init`, and then a second buffer of the WTF-8 size + 1 would be allocated to store the parsed arguments. The converted WTF-8 command line would then be parsed and the relevant bytes would be copied into the argument buffer before being returned.

After this commit, only the WTF-8 size of the WTF-16 string is calculated (without conversion) which is then used to allocate the buffer for the parsed arguments. Parsing is then done on the WTF-16 slice directly, with the arguments being converted to WTF-8 on-the-fly.

This has a few (minor) benefits:

- Cuts the amount of memory allocated by ArgIteratorWindows in half (or better)
- Makes the total amount of memory allocated by ArgIteratorWindows predictable, since, before, the upfront `wtf16LeToWtf8Alloc` call could end up allocating more-memory-than-necessary temporarily due to its internal use of an ArrayList. Now, the amount of memory allocated is always exactly `calcWtf8Len(cmd_line) + 1`.
2024-07-13 14:48:17 -07:00
..
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-12 00:46:03 -07:00
2024-03-21 14:11:46 -07:00
2024-02-23 02:37:11 -07:00
2024-03-19 11:45:09 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 21:15:29 -04:00
2024-03-21 14:11:46 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-02 16:31:15 +02:00
2024-03-15 02:28:50 -04:00
2024-03-10 18:13:30 -07:00
2024-03-21 14:11:46 -07:00
2024-07-09 14:25:42 -07:00
2024-05-11 02:17:11 -07:00
2024-07-05 04:45:44 -04:00
2024-03-10 18:13:30 -07:00
2024-07-02 08:59:10 +02:00
2024-05-26 16:13:54 -04:00
2024-03-21 14:11:46 -07:00
2024-02-05 11:55:14 +03:30
2024-03-19 11:45:09 -07:00
2024-06-01 13:28:16 +03:00
2024-07-09 14:25:42 -07:00
2024-04-15 15:24:30 -07:00
2024-03-19 11:45:09 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 21:15:29 -04:00
2024-06-15 00:57:52 +01:00
2024-06-17 16:12:19 -04:00