projectionAddRetainedListHostBytes function
int
projectionAddRetainedListHostBytes(
- int retained,
- int length
)
Implementation
int projectionAddRetainedListHostBytes(int retained, int length) {
if (length < 0 ||
length > _maxSafeRetainedBytes ~/ projectionRetainedListItemHostBytes) {
throw acp.ChatInputLimitExceeded(
resource: 'chat retained state bytes',
limit: _maxSafeRetainedBytes,
observedAtLeast: _maxSafeRetainedBytes + 1,
);
}
retained = projectionCheckedRetainedAdd(
retained,
projectionRetainedListHostBytes,
);
return projectionCheckedRetainedAdd(
retained,
length * projectionRetainedListItemHostBytes,
);
}