diff options
author | Sorin Vinturis <svinturis@cloudbasesolutions.com> | 2015-03-26 19:59:36 +0000 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-03-26 14:17:59 -0700 |
commit | aa63bc9de230f688692831ee9719a0b9b5eddc6b (patch) | |
tree | 2406fbcca30e08f3e1cb4daa0d206a4aa2e4a8ea /datapath-windows/ovsext/Util.c | |
parent | 1d741d6dfce5752b8a04568e18da15a2788b70b0 (diff) | |
download | openvswitch-aa63bc9de230f688692831ee9719a0b9b5eddc6b.tar.gz |
datapath-windows: Support for allocating/releasing memory with tag
Added functions for allocating and releasing memory with specified
tag.
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/56
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Util.c')
-rw-r--r-- | datapath-windows/ovsext/Util.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Util.c b/datapath-windows/ovsext/Util.c index 2dfba8e3a..65dd1327a 100644 --- a/datapath-windows/ovsext/Util.c +++ b/datapath-windows/ovsext/Util.c @@ -24,6 +24,21 @@ extern NDIS_HANDLE gOvsExtDriverHandle; +VOID* +OvsAllocateMemoryWithTag(size_t size, ULONG tag) +{ + OVS_VERIFY_IRQL_LE(DISPATCH_LEVEL); + return NdisAllocateMemoryWithTagPriority(gOvsExtDriverHandle, + (UINT32)size, tag, NormalPoolPriority); +} + +VOID +OvsFreeMemoryWithTag(VOID *ptr, ULONG tag) +{ + ASSERT(ptr); + NdisFreeMemoryWithTagPriority(gOvsExtDriverHandle, ptr, tag); +} + VOID * OvsAllocateMemory(size_t size) { |