From 07196197675c07c712eba0c24a934dcbe20783e4 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 2 Aug 2017 00:16:33 +0900 Subject: table: allocate bitmap for path id dynamically allocating 256 bytes per prefix isn't a good idea. Let's allocate 8 bytes by default and expand dynamically if necessary. Signed-off-by: FUJITA Tomonori --- table/adj.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'table/adj.go') diff --git a/table/adj.go b/table/adj.go index 05a795be..98c714e6 100644 --- a/table/adj.go +++ b/table/adj.go @@ -178,7 +178,7 @@ func (adj *AdjRib) Select(family bgp.RouteFamily, accepted bool, option ...Table if d, y := dsts[path.GetNlri().String()]; y { d.knownPathList = append(d.knownPathList, path) } else { - dst := NewDestination(path.GetNlri()) + dst := NewDestination(path.GetNlri(), 0) dsts[path.GetNlri().String()] = dst dst.knownPathList = append(dst.knownPathList, path) } -- cgit v1.2.3