Introduce 'Count' type to avoid abusing 'Offset'

This commit is contained in:
Bryan Boreham authored and Matthias Radestock committed 2016-03-19 11:47:34 +00:00
1 parent 7b6364696c
commit f11314ed3e
9 files changed
+45 -38

No files matched your search

+2 -2
View File
@@ -167,8 +167,8 @@ func (alloc *Allocator) claimRingForTesting(allocs ...*Allocator) {
alloc.space.AddRanges(alloc.ring.OwnedRanges())
}
func (alloc *Allocator) NumFreeAddresses(r address.Range) address.Offset {
resultChan := make(chan address.Offset)
func (alloc *Allocator) NumFreeAddresses(r address.Range) address.Count {
resultChan := make(chan address.Count)
alloc.actionChan <- func() {
resultChan <- alloc.space.NumFreeAddressesInRange(r)
}