ReservationCollection.GetBestMatchingReservation(Int64) Method

Definition

When overridden in a derived class, gets the best matching reservation for a given size.

protected:
 long GetBestMatchingReservation(long size);
protected long GetBestMatchingReservation (long size);
member this.GetBestMatchingReservation : int64 -> int64
Protected Function GetBestMatchingReservation (size As Long) As Long

Parameters

size
Int64

The size of the reservation that must be fit.

Returns

Int64

A reservation from the collection that is greater than or equal to the specified size, or -1 if no such reservation exists.

Remarks

This method is typically called when appending a record from reserved space to a record sequence. When it returns, a reservation of the returned size has been removed from the collection. If, for some reason, the reserved space is not actually accessed, the ReservationMade method should be called to ensure that the ReservationCollection accurately represents the amount of reserved space in the record sequence.

Applies to