Skip to content

Commit

Permalink
fix typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
isnotinvain committed Feb 23, 2015
1 parent 61c0100 commit 9939d8d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* instead of equal to the total previous size of all slabs. This is useful because it prevents allocating roughly
* twice the needed space when a new slab is added just before the stream is done being used.
*
* When reusing a this stream it will adjust the initial slab size based on the previous data size, aiming for fewer
* When reusing this stream it will adjust the initial slab size based on the previous data size, aiming for fewer
* allocations, with the assumption that a similar amount of data will be written to this stream on re-use.
* See ({@link CapacityByteArrayOutputStream#reset()}).
*
Expand Down Expand Up @@ -73,7 +73,7 @@ public class CapacityByteArrayOutputStream extends OutputStream {
*
* @param minSlabSize no matter what we shouldn't make slabs any smaller than this
* @param targetCapacity after we've allocated targetNumSlabs how much capacity should we have?
* @param targetNumSlabs how many slabs should it take to reach targetTotalSize?
* @param targetNumSlabs how many slabs should it take to reach targetCapacity?
*/
public static int initialSlabSizeHeuristic(int minSlabSize, int targetCapacity, int targetNumSlabs) {
// initialSlabSize = (targetCapacity / (2^targetNumSlabs)) means we double targetNumSlabs times
Expand Down

0 comments on commit 9939d8d

Please sign in to comment.