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>
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)
{
#define OVS_OTHER_POOL_TAG 'MSVO'
VOID *OvsAllocateMemory(size_t size);
+VOID *OvsAllocateMemoryWithTag(size_t size, ULONG tag);
VOID *OvsAllocateAlignedMemory(size_t size, UINT16 align);
VOID OvsFreeMemory(VOID *ptr);
+VOID OvsFreeMemoryWithTag(VOID *ptr, ULONG tag);
VOID OvsFreeAlignedMemory(VOID *ptr);
#define LIST_FORALL(_headPtr, _itemPtr) \