(n)
| 24408 | // Don't raise the hwm > 8MB |
| 24409 | var MAX_HWM = 0x800000; |
| 24410 | function computeNewHighWaterMark(n) { |
| 24411 | if (n >= MAX_HWM) { |
| 24412 | n = MAX_HWM; |
| 24413 | } else { |
| 24414 | // Get the next highest power of 2 to prevent increasing hwm excessively in |
| 24415 | // tiny amounts |
| 24416 | n--; |
| 24417 | n |= n >>> 1; |
| 24418 | n |= n >>> 2; |
| 24419 | n |= n >>> 4; |
| 24420 | n |= n >>> 8; |
| 24421 | n |= n >>> 16; |
| 24422 | n++; |
| 24423 | } |
| 24424 | return n; |
| 24425 | } |
| 24426 | |
| 24427 | // This function is designed to be inlinable, so please take care when making |
| 24428 | // changes to the function body. |