(n)
| 618 | // Don't raise the hwm > 1GB. |
| 619 | const MAX_HWM = 0x40000000; |
| 620 | function computeNewHighWaterMark(n) { |
| 621 | if (n > MAX_HWM) { |
| 622 | throw new ERR_OUT_OF_RANGE('size', '<= 1GiB', n); |
| 623 | } else { |
| 624 | // Get the next highest power of 2 to prevent increasing hwm excessively in |
| 625 | // tiny amounts. |
| 626 | n--; |
| 627 | n |= n >>> 1; |
| 628 | n |= n >>> 2; |
| 629 | n |= n >>> 4; |
| 630 | n |= n >>> 8; |
| 631 | n |= n >>> 16; |
| 632 | n++; |
| 633 | } |
| 634 | return n; |
| 635 | } |
| 636 | |
| 637 | // This function is designed to be inlinable, so please take care when making |
| 638 | // changes to the function body. |
no outgoing calls
no test coverage detected
searching dependent graphs…