ofproto-dpif: Avoid malloc() in common case for allocating subfacets.
authorBen Pfaff <blp@nicira.com>
Fri, 6 Apr 2012 22:30:21 +0000 (15:30 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 19 Apr 2012 03:28:50 +0000 (20:28 -0700)
commit26cd7e348bdb1443d31889c8e773ef8c7f2a4ea8
tree754a3df0ea9683c98a67b18a8c9b2cb016e321d5
parent5f5fbd1780b356373e31d939f4312589599c5e67
ofproto-dpif: Avoid malloc() in common case for allocating subfacets.

Usually a facet has exactly one subfacet that has the same lifetime as
the facet.  Allocating both the facet and its subfacet in a single memory
block improves performance.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c