Updated Server-CD-Client memory tests. Fixed minor bugs
authorJustin Sobota <jsobota@ti.com>
Fri, 5 Apr 2013 22:16:03 +0000 (18:16 -0400)
committerJustin Sobota <jsobota@ti.com>
Fri, 5 Apr 2013 22:16:03 +0000 (18:16 -0400)
include/rm_transportloc.h
rm.h
src/rm.c
src/rm_allocator.c
src/rm_transport.c
test/k2h/c66/bios/rmK2HC66BiosMemTestProject.txt
test/k2h/c66/bios/rm_mem_test.cfg
test/k2k/c66/bios/rmK2KC66BiosMemTestProject.txt
test/k2k/c66/bios/rm_mem_test.cfg
test/rm_mem_test.c

index 3cfb64ac90ac46af002fc39e39f3a0db68678fad..af9b77f603ab46f0a5a9929d7df4b679e8554c0d 100644 (file)
@@ -174,7 +174,7 @@ typedef struct {
     int32_t  requestState;
 } Rm_NsResponsePkt;
 
-Rm_Transport *rmTransportFindRemoteName(Rm_Transport *transports, char *remoteName);
+Rm_Transport *rmTransportFindRemoteName(Rm_Transport *transports, const char *remoteName);
 Rm_Transport *rmTransportFindRemoteInstType(Rm_Transport *transports, Rm_InstType remoteInstType);
 
 #ifdef __cplusplus
diff --git a/rm.h b/rm.h
index 03bd89de5e7d8a3888026227ddb8dbf15ecd6485..0745d743ba389e16699f743e00cf6216d8922065 100644 (file)
--- a/rm.h
+++ b/rm.h
@@ -298,34 +298,32 @@ extern "C" {
 #define RM_ERROR_NS_NAME_AND_RES_VAL_CONFLICT      RM_ERROR_BASE-36
 /** Instance type not recognized */
 #define RM_ERROR_INVALID_INST_TYPE                 RM_ERROR_BASE-37
-/** Linux DTB alias properties specified in GRL but no Linux DTB provided during server instance init */
-#define RM_ERROR_GRL_LINUX_ALIAS_BUT_NO_DTB        RM_ERROR_BASE-38
 /** RM attempted to allocate a transport packet but the rmAllocPkt callout was not registered */
-#define RM_ERROR_TRANSPORT_ALLOC_PKT_NOT_REGD      RM_ERROR_BASE-39
+#define RM_ERROR_TRANSPORT_ALLOC_PKT_NOT_REGD      RM_ERROR_BASE-38
 /** RM attempted to send a packet but the rmSendPkt callout was not registered */
-#define RM_ERROR_TRANSPORT_SEND_NOT_REGD           RM_ERROR_BASE-40
+#define RM_ERROR_TRANSPORT_SEND_NOT_REGD           RM_ERROR_BASE-39
 /** RM attempted to send a response packet but the transport to the remote instance that sent
  *  the request packet is not registered */
-#define RM_ERROR_TRANSPORT_REMOTE_HNDL_NOT_REGD    RM_ERROR_BASE-41
+#define RM_ERROR_TRANSPORT_REMOTE_HNDL_NOT_REGD    RM_ERROR_BASE-40
 /** RM instance cannot be deleted with transports still registered */
-#define RM_ERROR_CANT_DELETE_WITH_REGD_TRANSPORT   RM_ERROR_BASE-42
+#define RM_ERROR_CANT_DELETE_WITH_REGD_TRANSPORT   RM_ERROR_BASE-41
 /** RM instance cannot be deleted with open service handle */
-#define RM_ERROR_CANT_DELETE_WITH_OPEN_SERV_HNDL   RM_ERROR_BASE-43
+#define RM_ERROR_CANT_DELETE_WITH_OPEN_SERV_HNDL   RM_ERROR_BASE-42
 /** RM instance cannot be deleted when there are transactions pending and the 
  *  ignorePendingServices parameter is set to false */
-#define RM_ERROR_CANT_DELETE_PENDING_TRANSACTIONS  RM_ERROR_BASE-44
+#define RM_ERROR_CANT_DELETE_PENDING_TRANSACTIONS  RM_ERROR_BASE-43
 /** Only the Server instance can be used to return resource status via the
  *  Rm_resourceStatus API */
-#define RM_ERROR_INVALID_RES_STATUS_INSTANCE       RM_ERROR_BASE-45
+#define RM_ERROR_INVALID_RES_STATUS_INSTANCE       RM_ERROR_BASE-44
 /** RM Shared Server and Client instances should always return a finished request since 
  *  the instance has access to the resource structures no matter what core the service
  *  is requested from */
-#define RM_ERROR_SHARED_INSTANCE_UNFINISHED_REQ    RM_ERROR_BASE-46
+#define RM_ERROR_SHARED_INSTANCE_UNFINISHED_REQ    RM_ERROR_BASE-45
 /** RM Shared Server and Client instances cannot register transports */
-#define RM_ERROR_SHARED_INSTANCE_CANNOT_REG_TRANS  RM_ERROR_BASE-47
+#define RM_ERROR_SHARED_INSTANCE_CANNOT_REG_TRANS  RM_ERROR_BASE-46
 /** RM Shared Client handle was provided an invalid Shared Server handle.  The shared
  *  server handle was either NULL or was not an instance of type Rm_instType_SHARED_SERVER */
-#define RM_ERROR_INVALID_SHARED_SERVER_HANDLE      RM_ERROR_BASE-48
+#define RM_ERROR_INVALID_SHARED_SERVER_HANDLE      RM_ERROR_BASE-47
 
 /** 
  * @brief Maximum number of characters allowed for RM instance, resource, and
index 84018395caed08999d8f810d7c4ac6672550eef4..30633652d938fc42e16a4f4c29f4f203a6c9a7ec 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -288,7 +288,7 @@ static void transactionResponder (Rm_Inst *rmInst, Rm_Transaction *transaction)
         transaction->state = RM_ERROR_TRANSPORT_REMOTE_HNDL_NOT_REGD;
     }
 errorExit:
-    /* Do not delete transaction on error.  Error transactions should be visible from
+    /* Do not delete transaction on transport error.  Transport rrror transactions should be visible
      * from Rm_printInstanceStatus() */
     return;
 }
@@ -345,8 +345,11 @@ static void transactionForwarder (Rm_Inst *rmInst, Rm_Transaction *transaction)
         }              
         transaction->hasBeenForwarded = RM_TRUE;
         /* Transaction not deleted.  Waiting for response from RM CD or Server */
-    }        
+    }  
+    return;
 errorExit: 
+    /* Do not delete transaction on transport error.  Transport rrror transactions should be visible
+     * from Rm_printInstanceStatus() */               
     return;
 }
 
@@ -617,17 +620,7 @@ static void clientDelegateProcess (Rm_Inst *rmInst, Rm_Transaction *transaction)
             }
             else {
                 allocationHandler(rmInst, transaction);
-            }
-            
-            if ((transaction->state != RM_SERVICE_PROCESSING) &&
-                (transaction->state != RM_SERVICE_APPROVED_STATIC)) {
-                /* Transaction error occurred.  Return result */
-                if (strncmp(transaction->serviceSrcInstName, rmInst->instName, RM_NAME_MAX_CHARS)) {
-                    /* Source of failed transaction was not CD, return transaction via responder */
-                    transactionResponder(rmInst, transaction);
-                }
-                /* Otherwise let call stack return failed transaction result app via Rm_serviceHandler */                
-            }            
+            }          
         }
         else {
             /* Transaction validated.  Return result. */
index eb78fb40cc75172464fecf4c48a03d843ade9800..8e034f0b84ced13ed418d69c1c4021384e01920a 100644 (file)
@@ -1173,9 +1173,6 @@ static int32_t allocatorExtractGrlResProps(Rm_Handle rmHandle, const char *resou
                         retVal = allocatorFindLinuxResource(rmHandle, resourceName, linuxDtb, linuxAlias);            
                     }
                 }
-                else {
-                    retVal = RM_ERROR_GRL_LINUX_ALIAS_BUT_NO_DTB;
-                }
             }
         }
     }
index a0c627409eaaf7a1543c50a852cfcf5d32fe45fb..aba3c93d2e66f5273fd9d37646b681abccd18df2 100644 (file)
@@ -154,7 +154,7 @@ static void transportDelete(Rm_Transport *transport)
  *              instance name.  NULL is returned if no transports in \r
  *              the list match the remote instance name.\r
  */\r
-Rm_Transport *rmTransportFindRemoteName(Rm_Transport *transports, char *remoteName)\r
+Rm_Transport *rmTransportFindRemoteName(Rm_Transport *transports, const char *remoteName)\r
 {\r
     while (transports) {\r
         if (strncmp(transports->remoteInstName, remoteName, RM_NAME_MAX_CHARS) == 0) {\r
@@ -216,45 +216,52 @@ Rm_TransportHandle Rm_transportRegister (const Rm_TransportCfg *transportCfg, in
         goto errorExit;\r
     }\r
 \r
-    /* No one can connect to a shared server\r
-     * RM Servers cannot connect to other Servers.  \r
-     * RM Client Delegates cannot connect to other Client Delegates.\r
-     * RM Clients cannot connect to other Clients */\r
-    if ((transportCfg->remoteInstType == Rm_instType_SHARED_SERVER) ||\r
-        ((rmInst->instType == Rm_instType_SERVER) &&\r
-         (transportCfg->remoteInstType == Rm_instType_SERVER)) ||\r
-        ((rmInst->instType == Rm_instType_CLIENT_DELEGATE) &&\r
-         (transportCfg->remoteInstType == Rm_instType_CLIENT_DELEGATE)) ||\r
-        ((rmInst->instType == Rm_instType_CLIENT) &&\r
-         (transportCfg->remoteInstType == Rm_instType_CLIENT))) {\r
-        *result = RM_ERROR_INVALID_REMOTE_INST_TYPE;\r
-        goto errorExit;\r
+    if (transport = rmTransportFindRemoteName(rmInst->transports, transportCfg->remoteInstName)) {\r
+        /* Reconfigure existing transport's appTransportHandle.  Used in cases where instances\r
+         * running on same core connected by function call. */\r
+        transport->appTransportHandle = transportCfg->appTransportHandle;\r
     }\r
+    else {\r
+        /* No one can connect to a shared server\r
+         * RM Servers cannot connect to other Servers.  \r
+         * RM Client Delegates cannot connect to other Client Delegates.\r
+         * RM Clients cannot connect to other Clients */\r
+        if ((transportCfg->remoteInstType == Rm_instType_SHARED_SERVER) ||\r
+            ((rmInst->instType == Rm_instType_SERVER) &&\r
+             (transportCfg->remoteInstType == Rm_instType_SERVER)) ||\r
+            ((rmInst->instType == Rm_instType_CLIENT_DELEGATE) &&\r
+             (transportCfg->remoteInstType == Rm_instType_CLIENT_DELEGATE)) ||\r
+            ((rmInst->instType == Rm_instType_CLIENT) &&\r
+             (transportCfg->remoteInstType == Rm_instType_CLIENT))) {\r
+            *result = RM_ERROR_INVALID_REMOTE_INST_TYPE;\r
+            goto errorExit;\r
+        }\r
 \r
-    /* Verify Clients are not registering with more than one Client Delegate or Server. And\r
-     * that Client Delegate is not registering with more than one Server. */\r
-    if (rmInst->registeredWithDelegateOrServer &&\r
-        (((rmInst->instType == Rm_instType_CLIENT) &&\r
-          (transportCfg->remoteInstType == Rm_instType_CLIENT_DELEGATE)) || \r
-         ((rmInst->instType == Rm_instType_CLIENT_DELEGATE) &&\r
-          (transportCfg->remoteInstType == Rm_instType_SERVER)))) {\r
-        *result = RM_ERROR_ALREADY_REGD_SERVER_OR_CD;\r
-        goto errorExit;\r
-    }         \r
-    \r
-    if (!transportCfg->transportCallouts.rmAllocPkt) {\r
-        *result = RM_ERROR_TRANSPORT_ALLOC_PKT_NOT_REGD;\r
-        goto errorExit;\r
-    }\r
-    else if (!transportCfg->transportCallouts.rmSendPkt) {\r
-        *result = RM_ERROR_TRANSPORT_SEND_NOT_REGD;\r
-        goto errorExit;\r
-    }\r
+        /* Verify Clients are not registering with more than one Client Delegate or Server. And\r
+         * that Client Delegate is not registering with more than one Server. */\r
+        if (rmInst->registeredWithDelegateOrServer &&\r
+            (((rmInst->instType == Rm_instType_CLIENT) &&\r
+              (transportCfg->remoteInstType == Rm_instType_CLIENT_DELEGATE)) || \r
+             ((rmInst->instType == Rm_instType_CLIENT_DELEGATE) &&\r
+              (transportCfg->remoteInstType == Rm_instType_SERVER)))) {\r
+            *result = RM_ERROR_ALREADY_REGD_SERVER_OR_CD;\r
+            goto errorExit;\r
+        }         \r
+        \r
+        if (!transportCfg->transportCallouts.rmAllocPkt) {\r
+            *result = RM_ERROR_TRANSPORT_ALLOC_PKT_NOT_REGD;\r
+            goto errorExit;\r
+        }\r
+        else if (!transportCfg->transportCallouts.rmSendPkt) {\r
+            *result = RM_ERROR_TRANSPORT_SEND_NOT_REGD;\r
+            goto errorExit;\r
+        }\r
 \r
-    transport = transportAdd(transportCfg);\r
-    if ((transport->remoteInstType == Rm_instType_CLIENT_DELEGATE) ||\r
-        (transport->remoteInstType == Rm_instType_SERVER)) {\r
-        rmInst->registeredWithDelegateOrServer = RM_TRUE;\r
+        transport = transportAdd(transportCfg);\r
+        if ((transport->remoteInstType == Rm_instType_CLIENT_DELEGATE) ||\r
+            (transport->remoteInstType == Rm_instType_SERVER)) {\r
+            rmInst->registeredWithDelegateOrServer = RM_TRUE;\r
+        }\r
     }\r
 errorExit:\r
     RM_SS_INST_WB_EXIT_CS(key);    \r
index 517fe6c643a3f1f17dde1f165a9157f898887fc3..ccb55e3df4baa78f09e1ba35953cf243b1240c63 100644 (file)
@@ -1,6 +1,10 @@
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_mem_test.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/k2h/global-resource-list.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/k2h/policy_dsp_arm.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/global-resources.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/server-policy.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/static-policy.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/linux-evm.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_transport_setup.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_osal.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/k2h/c66/bios/rm_mem_test.cfg"
index 1119c5e3d2b36d8d348dc81e0972cbd77038ee4b..c50ed1a495ad516aec230807e8c534c79a34f1ea 100644 (file)
@@ -62,14 +62,17 @@ var MultiProc   = xdc.useModule('ti.sdo.utils.MultiProc');
 
 /* BIOS/XDC modules */
 var BIOS        = xdc.useModule('ti.sysbios.BIOS');
-BIOS.heapSize   = 0x10000;
+BIOS.heapSize   = 0x80000;
 var Task        = xdc.useModule('ti.sysbios.knl.Task');
 
+/* Okay for these to be in L2 since it's only read once at startup */
 Program.sectMap[".sharedGRL"] = new Program.SectionSpec();
 Program.sectMap[".sharedGRL"] = "L2SRAM";
+Program.sectMap[".sharedGlobalPolicy"] = new Program.SectionSpec();
+Program.sectMap[".sharedGlobalPolicy"] = "L2SRAM";
 
 Program.sectMap[".sharedPolicy"] = new Program.SectionSpec();
-Program.sectMap[".sharedPolicy"] = "L2SRAM";
+Program.sectMap[".sharedPolicy"] = "MSMCSRAM";
 
 Program.sectMap[".rm"] = new Program.SectionSpec();
 Program.sectMap[".rm"] = "MSMCSRAM";
index 2747125af8efd0b9f1230fa4e06ffa485a52aea4..3df3d1b9cd408e8fbce67c9cfbd51c3c6ad0fc48 100644 (file)
@@ -1,6 +1,10 @@
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_mem_test.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/k2k/global-resource-list.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/k2k/policy_dsp_arm.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/global-resources.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/server-policy.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/static-policy.c"
+-ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/dts_files/linux-evm.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_transport_setup.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_osal.c"
 -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/k2k/c66/bios/rm_mem_test.cfg"
index fc9b6392e631c5c1ca68bb3474e3849436c7efc3..ae8c491ec1bbcaa78eae71da20d91a95f0e646f4 100644 (file)
@@ -62,14 +62,17 @@ var MultiProc   = xdc.useModule('ti.sdo.utils.MultiProc');
 
 /* BIOS/XDC modules */
 var BIOS        = xdc.useModule('ti.sysbios.BIOS');
-BIOS.heapSize   = 0x10000;
+BIOS.heapSize   = 0x80000;
 var Task        = xdc.useModule('ti.sysbios.knl.Task');
 
+/* Okay for these to be in L2 since it's only read once at startup */
 Program.sectMap[".sharedGRL"] = new Program.SectionSpec();
 Program.sectMap[".sharedGRL"] = "L2SRAM";
+Program.sectMap[".sharedGlobalPolicy"] = new Program.SectionSpec();
+Program.sectMap[".sharedGlobalPolicy"] = "L2SRAM";
 
 Program.sectMap[".sharedPolicy"] = new Program.SectionSpec();
-Program.sectMap[".sharedPolicy"] = "L2SRAM";
+Program.sectMap[".sharedPolicy"] = "MSMCSRAM";
 
 Program.sectMap[".rm"] = new Program.SectionSpec();
 Program.sectMap[".rm"] = "MSMCSRAM";
index 87eab795c586a2259eec3070bc70f9b3dfabb265..601a62eabbb493dc6b494c448c61a91c158f2d62 100644 (file)
  ********************** Extern Variables ******************************
  **********************************************************************/
 
-/* RM test Global Resource List (GRL) */
+/* GRL for testing multicore Server-Client interaction leaks */
 extern const char rmGlobalResourceList[];
-/* RM test Global Policy provided to RM Server */
+/* Global policy for testing multicore Server-Client interaction leaks */
 extern const char rmDspPlusArmPolicy[];
 
+/* GRL for testing Server-CD-Client interaction leaks */
+extern const char rmGRL[];
+/* Global policy for testing Server-CD-Client interaction leaks */
+extern const char rmGlobalPolicy[];
+/* Static policy for testing Server-CD-Client interaction leaks */
+extern const char rmStaticPolicy[];
+/* Example Linux DTB */
+extern const char rmLinuxDtb[];
+
 /* Alloc and free OSAL variables */
 extern uint32_t rmMallocCounter;
 extern uint32_t rmFreeCounter;
 
-extern void Osal_rmBeginMemAccess(void *ptr, uint32_t size);
-extern void Osal_rmEndMemAccess(void *ptr, uint32_t size);
+extern void *Osal_rmMalloc (uint32_t num_bytes);
+extern void  Osal_rmFree (void *ptr, uint32_t size);
+extern void  Osal_rmBeginMemAccess(void *ptr, uint32_t size);
+extern void  Osal_rmEndMemAccess(void *ptr, uint32_t size);
 
 extern int setupRmTransConfig(uint32_t numTestCores, uint32_t systemInitCore, Task_FuncPtr testTask);
 extern int deleteRmTrans(void);
@@ -134,11 +145,15 @@ uint32_t            sFree, mFree;
 /* RM response info queue used to store service responses received via the callback function */
 Rm_ServiceRespInfo  responseInfoQueue[MAX_QUEUED_SERVICE_RESPONSES];
 
-/* RM resource names (must match resource node names in GRL and policies */
-char                resourceNameGpQ[RM_NAME_MAX_CHARS]        = "GENERAL_PURPOSE_QUEUE-qm1";
+/* rmGRL resource names (must match resource node names in rmGRL, rmGlobalPolicy, and rmStaticPolicy */
+char                resNameGpQ[RM_NAME_MAX_CHARS]   = "gp-queue";
+char                resNameQos[RM_NAME_MAX_CHARS]   = "qos-cluster";
+
+/* rmGlobalResourceList names (must match resource node names in rmGlobalResourceList and rmDspPlusArmPolicy */
+char                resNameMcGpQ[RM_NAME_MAX_CHARS] = "GENERAL_PURPOSE_QUEUE-qm1";
 
 /* Test RM NameServer name */
-char                nameServerNameFavQ[RM_NAME_MAX_CHARS]     = "My_Favorite_Queue";
+char                nsNameFavQ[RM_NAME_MAX_CHARS]   = "My_Favorite_Queue";
 
 /* RM initialization sync point */
 #pragma DATA_SECTION (isRmInitialized, ".rm");
@@ -158,39 +173,27 @@ volatile int8_t   isRmInitialized[128];
         System_abort("Test Failure\n");                                          \
     }
 
-#define MEM_PRE_PRINT(title, apiOrFunc)                                                         \
-    do {                                                                                        \
-        char titleMsg[] = title;                                                                \
-        char apiOrFuncMsg[] = apiOrFunc;                                                        \
-                                                                                                \
-        sMalloc = rmMallocCounter;                                                              \
-        sFree   = rmFreeCounter;                                                                \
-        System_printf ("Core %d : ---------------------------------------------------------\n", \
-                       coreNum);                                                                \
-        System_printf ("Core %d : %s\n", coreNum, titleMsg);                                    \
-        System_printf ("Core %d : - API/Functionality     : malloc count   |   free count -\n", \
-                       coreNum);                                                                \
-        System_printf ("Core %d : - %s :  %6d        |  %6d      -\n", coreNum, apiOrFuncMsg,   \
-                       sMalloc, sFree);                                                         \
-    } while(0)
-
-#define MEM_MID_PRINT(apiOrFunc)                                                              \
-    do {                                                                                      \
-        char apiOrFuncMsg[] = apiOrFunc;                                                      \
-                                                                                              \
-        mMalloc = rmMallocCounter;                                                            \
-        mFree   = rmFreeCounter;                                                              \
-        System_printf ("Core %d : - %s :  %6d        |  %6d      -\n", coreNum, apiOrFuncMsg, \
-                       mMalloc, mFree);                                                       \
-    } while(0)
-
-#define MEM_END_PRINT(apiOrFunc)                                                                    \
+#define MEM_TEST_START_STORE() sMalloc = rmMallocCounter; sFree = rmFreeCounter; 
+#define MEM_TEST_MID_STORE()   mMalloc = rmMallocCounter; mFree = rmFreeCounter; 
+#define MEM_TEST_END_PRINT(title, sApiOrFunc, mApiOrFunc, eApiOrFunc)                               \
     do {                                                                                            \
-        char    apiOrFuncMsg[] = apiOrFunc;                                                         \
+        char    titleMsg[] = title;                                                                 \
+        char    sApiOrFuncMsg[] = sApiOrFunc;                                                       \
+        char    mApiOrFuncMsg[] = mApiOrFunc;                                                       \
+        char    eApiOrFuncMsg[] = eApiOrFunc;                                                       \
         int32_t mallocFreeBalance = (rmMallocCounter - sMalloc) - (rmFreeCounter - sFree);          \
                                                                                                     \
+        System_printf ("Core %d : ---------------------------------------------------------\n",     \
+                       coreNum);                                                                    \
+        System_printf ("Core %d : %s\n", coreNum, titleMsg);                                        \
+        System_printf ("Core %d : - API/Functionality     : malloc count   |   free count -\n",     \
+                       coreNum);                                                                    \
+        System_printf ("Core %d : - %s :  %6d        |  %6d      -\n", coreNum, sApiOrFuncMsg,      \
+                       sMalloc, sFree);                                                             \
+        System_printf ("Core %d : - %s :  %6d        |  %6d      -\n", coreNum, mApiOrFuncMsg,      \
+                       mMalloc, mFree);                                                             \
         System_printf ("Core %d : - %s :  %6d        |  %6d      -\n", coreNum,                     \
-                       apiOrFuncMsg, rmMallocCounter, rmFreeCounter);                               \
+                       eApiOrFuncMsg, rmMallocCounter, rmFreeCounter);                              \
         if (mallocFreeBalance > 0) {                                                                \
             System_printf ("Core %d : - FAILED - %6d unfreed mallocs                       -\n",    \
                            coreNum, mallocFreeBalance);                                             \
@@ -208,6 +211,7 @@ volatile int8_t   isRmInitialized[128];
         System_printf ("\n");                                                                       \
     } while(0)
 
+
 /**********************************************************************
  *************************** Test Functions ***************************
  **********************************************************************/
@@ -335,20 +339,45 @@ void rmServerTsk(UArg arg0, UArg arg1)
     serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
     ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
 
-    MEM_PRE_PRINT("------------- Remote Alloc/Free From Client -------------", "Pre Client Alloc     "); 
+
+    MEM_TEST_START_STORE();
     /* Leave the server gate to let client task request resource */
     GateMP_leave(serverGateHandle, serverKey);
     /* Block until Client finishes allocating the resource */
     clientKey = GateMP_enter(clientGateHandle);
-    MEM_MID_PRINT("Post Client Alloc Req");    
+    MEM_TEST_MID_STORE();  
     GateMP_leave(clientGateHandle, clientKey);
     /* Block until Client finishes freeing the resource */
-    clientKey = GateMP_enter(clientGateHandle);           
-    MEM_END_PRINT("Post Client Free     ");
+    serverKey = GateMP_enter(serverGateHandle);
+    MEM_TEST_END_PRINT("------------- Remote Alloc/Free From Client -------------",
+                       "Pre Client Alloc     ", "Post Client Alloc Req", "Post Client Free     ");   
+
 
-    /* Reset sync mechanism */
+    MEM_TEST_START_STORE();
+    /* Leave the server gate to let client task request resources */
+    GateMP_leave(serverGateHandle, serverKey);
+    /* Block until Client finishes allocating the resources */
+    clientKey = GateMP_enter(clientGateHandle); 
+    MEM_TEST_MID_STORE();
     GateMP_leave(clientGateHandle, clientKey);
-    serverKey = GateMP_enter(serverGateHandle);      
+    /* Block until Client finishes freeing the resources */
+    serverKey = GateMP_enter(serverGateHandle);           
+    MEM_TEST_END_PRINT("-------- Remote Multiple Alloc/Free From Client ---------",
+                       "Pre Client Alloc     ", "Post Client Alloc Req", "Post Client Free     ");    
+
+
+    MEM_TEST_START_STORE();
+    /* Leave the server gate to let client task map a resource in the NameServer */
+    GateMP_leave(serverGateHandle, serverKey);
+    /* Block until Client finishes mapping resource */
+    clientKey = GateMP_enter(clientGateHandle);
+    MEM_TEST_MID_STORE();
+    GateMP_leave(clientGateHandle, clientKey);
+    /* Block until Client finishes unmapping resource */
+    serverKey = GateMP_enter(serverGateHandle);           
+    MEM_TEST_END_PRINT("-------- Remote NameServer Map/Unmap From Client --------",
+                       "Pre Client NS Map    ", "Post Client NS Map   ", "Post Client NS Unmap ");    
+
 
     Rm_serviceCloseHandle(serviceHandle);
     
@@ -370,50 +399,96 @@ void rmClientTsk(UArg arg0, UArg arg1)
     serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
     ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
 
+
     /* Block until server is ready to receive request */
     serverKey = GateMP_enter(serverGateHandle);
-    MEM_PRE_PRINT("------------ Client Alloc/Free (Non-Blocking) -----------", "Pre Alloc            ");        
+    MEM_TEST_START_STORE();      
     /* Allocate a resource to add a node to a resource tree */
-    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameMcGpQ, 
                  896, 1, 0, NULL, RM_TEST_FALSE, &response);
     serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
     ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
-    MEM_MID_PRINT("Post Alloc Request   ");
-    /* Let server print memory usage for alloc */
-    GateMP_leave(clientGateHandle, clientKey);
-    /* Block until Server prints malloc/free info */
+    /* Let server save memory usage for alloc */
+    GateMP_leave(clientGateHandle, clientKey);    
+    MEM_TEST_MID_STORE();
+    /* Block until Server saves malloc/free info */
     clientKey = GateMP_enter(clientGateHandle);     
-    setRmRequest(&request, Rm_service_RESOURCE_FREE, resourceNameGpQ, 
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameMcGpQ, 
                  896, 1, 0, NULL, RM_TEST_FALSE, &response);
     serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");        
-    MEM_END_PRINT("Post Free            ");
-    /* Let server print memory usage for free */
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");
+    MEM_TEST_END_PRINT("------------ Client Alloc/Free (Non-Blocking) -----------",
+                       "Pre Alloc            ", "Post Alloc Request   ", "Post Free            ");
+    /* Let server print memory usage */
+    GateMP_leave(serverGateHandle, serverKey);
+
+
+    /* Block until server is ready to receive request */
+    serverKey = GateMP_enter(serverGateHandle);
+    MEM_TEST_START_STORE();       
+    /* Perform multiple allocs to force the tree to combine nodes */
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameMcGpQ, 
+                 900, 50, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameMcGpQ, 
+                 2000, 50, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameMcGpQ, 
+                 1000, 1000, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameMcGpQ, 
+                 950, 50, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed"); 
+    /* Let server save memory usage for alloc */
     GateMP_leave(clientGateHandle, clientKey);
+    MEM_TEST_MID_STORE();    
+    /* Block until Server saves malloc/free info */
+    clientKey = GateMP_enter(clientGateHandle);      
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameMcGpQ, 
+                 1000, 500, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");     
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameMcGpQ, 
+                 1500, 550, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");   
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameMcGpQ, 
+                 900, 100, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");  
+    MEM_TEST_END_PRINT("--------------- Client Multiple Alloc/Free --------------",
+                       "Pre Alloc            ", "Post Alloc Requests  ", "Post Free            ");
+    /* Let server print memory usage */
+    GateMP_leave(serverGateHandle, serverKey);
+    
 
-    /* Reset sync mechanism */
+    /* Block until server is ready to receive request */
+    serverKey = GateMP_enter(serverGateHandle);
+    MEM_TEST_START_STORE();       
+    /* Map a resource in the NameServer */
+    setRmRequest(&request, Rm_service_RESOURCE_MAP_TO_NAME, resNameMcGpQ, 
+                 5000, 1, 0, nsNameFavQ, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "NameServer map failed");
+    /* Let server save memory usage for alloc */
+    GateMP_leave(clientGateHandle, clientKey);
+    MEM_TEST_MID_STORE();    
+    /* Block until Server saves malloc/free info */
+    clientKey = GateMP_enter(clientGateHandle);      
+    setRmRequest(&request, Rm_service_RESOURCE_UNMAP_NAME, NULL, 
+                 0, 0, 0, nsNameFavQ, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "NameServer unmap failed");
+    MEM_TEST_END_PRINT("-------------- Client NameServer Map/Unmap --------------",
+                       "Pre NS Map           ", "Name Mapped to NS    ", "Name Unmapped from NS");       
+    /* Let server print memory usage */
     GateMP_leave(serverGateHandle, serverKey);
-    clientKey = GateMP_enter(clientGateHandle);
 
-#if 0
-    /* Retrieve a resource via a NameServer name */
-    setRmRequest(&requestInfo, Rm_service_RESOURCE_GET_BY_NAME, NULL, 
-                 0, 0, 0, nameServerNameFavQ, RM_TEST_TRUE, &responseInfo);     
-    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &requestInfo, &responseInfo);
-    System_printf("Core %d : %s get resource with name %s : ", coreNum,
-                                                               rmInstName,
-                                                               nameServerNameFavQ);
-    if (responseInfo.serviceState == RM_SERVICE_PROCESSING) {
-        waitForResponse(&responseInfo);
-    }
-    if (responseInfo.serviceState == RM_SERVICE_APPROVED) {
-        System_printf("PASSED\n");
-    }
-    else {
-        System_printf("FAILED : denial or error : %d\n", responseInfo.serviceState);
-    } 
 
-#endif
     Rm_serviceCloseHandle(serviceHandle);
     
     /* Create the RM cleanup task. */
@@ -484,14 +559,471 @@ void rmStartupTsk(UArg arg0, UArg arg1)
     }
 }
 
-void main(Int argc, Char* argv[])
+Rm_Packet *rmLocalPktAlloc(Rm_AppTransportHandle appTransport, uint32_t pktSize, Rm_PacketHandle *pktHandle)
+{
+    Rm_Packet *rmPkt = NULL;
+
+    rmPkt = Osal_rmMalloc(sizeof(*rmPkt));
+    rmPkt->pktLenBytes = pktSize;
+    *pktHandle = (Rm_PacketHandle)rmPkt;
+    return (rmPkt);
+}
+
+int32_t rmLocalPktSendRcv (Rm_AppTransportHandle appTransport, Rm_PacketHandle pktHandle)
+{
+    Rm_TransportHandle  transportHandle = (Rm_TransportHandle)appTransport;
+    Rm_Packet          *rmPkt = (Rm_Packet *) pktHandle;  
+    int32_t             status;    
+
+    /* Provide packet to remote instance for processing */
+    if (status = Rm_receivePacket(transportHandle, rmPkt)) {
+        System_printf("Error Core %d : Receiving RM packet : %d\n", coreNum, status);
+    }
+
+    /* Free the packet */
+    Osal_rmFree(rmPkt, sizeof(*rmPkt));
+
+    return (status);
+}
+
+void testServer(void)
 {
     Rm_InitCfg          rmInitCfg;
     Rm_ServiceHandle   *serviceHandle;
     Rm_ServiceReqInfo   request;
     Rm_ServiceRespInfo  response;
     int32_t             rmResult;
-    int                 status;
+
+
+    MEM_TEST_START_STORE(); 
+    memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
+    System_sprintf (rmInstName, "RM_Server");
+    rmInitCfg.instName = rmInstName;
+    rmInitCfg.instType = Rm_instType_SERVER;
+    rmInitCfg.instCfg.serverCfg.globalResourceList = (void *)rmGRL;
+    rmInitCfg.instCfg.serverCfg.globalPolicy = (void *)rmGlobalPolicy;
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");    
+    MEM_TEST_MID_STORE();
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("------------------ Server Inst Init/Del -----------------",
+                       "Pre Rm_Init (Server) ", "Post Rm_Init (Server)", "Post Rm_Delete       ");    
+
+
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    MEM_TEST_START_STORE();
+    /* Open service handle */
+    serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
+    MEM_TEST_MID_STORE();
+    rmResult = Rm_serviceCloseHandle(serviceHandle);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");
+    MEM_TEST_END_PRINT("--------------- Open/Close Service Handle ---------------",
+                       "Pre Service Hnd Open ", "Service Hnd Opened   ", "Service Hnd Closed   ");    
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");        
+
+
+    MEM_TEST_START_STORE(); 
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    /* Open service handle */
+    serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
+    /* Allocate a resource to add a node to a resource tree */
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 896, 1, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    MEM_TEST_MID_STORE();
+    /* Delete instance making sure allocation cleaned up properly from resource tree */
+    rmResult = Rm_serviceCloseHandle(serviceHandle);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");        
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("-------------- Server Inst Init/Del w/ Alloc ------------",
+                       "Pre Rm_Init (Server) ", "Post Alloc Req       ", "Post Rm_Delete       ");
+    
+
+    /* Service request memory tests */
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    /* Open service handle */
+    serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
+
+
+    MEM_TEST_START_STORE();        
+    /* Allocate a resource to add a node to a resource tree */
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 896, 1, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
+    MEM_TEST_MID_STORE();
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 896, 1, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");        
+    MEM_TEST_END_PRINT("-------------------- Server Alloc/Free ------------------",
+                       "Pre Alloc            ", "Post Alloc Request   ", "Post Free            ");    
+
+
+    MEM_TEST_START_STORE();        
+    /* Perform multiple allocs to force the tree to combine nodes */
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 900, 50, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 2000, 50, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 1000, 1000, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 950, 50, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");   
+    MEM_TEST_MID_STORE();
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 1000, 500, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");     
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 1500, 550, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");   
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 900, 100, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");           
+    MEM_TEST_END_PRINT("--------------- Server Multiple Alloc/Free --------------",
+                       "Pre Alloc            ", "Post Alloc Requests  ", "Post Free            ");    
+
+
+    MEM_TEST_START_STORE();        
+    /* Map a resource in the NameServer */
+    setRmRequest(&request, Rm_service_RESOURCE_MAP_TO_NAME, resNameGpQ, 
+                 5000, 1, 0, nsNameFavQ, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "NameServer map failed");
+    MEM_TEST_MID_STORE();
+    setRmRequest(&request, Rm_service_RESOURCE_UNMAP_NAME, NULL, 
+                 0, 0, 0, nsNameFavQ, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "NameServer unmap failed");
+    MEM_TEST_END_PRINT("-------------- Server NameServer Map/Unmap --------------",
+                       "Pre NS Map           ", "Name Mapped to NS    ", "Name Unmapped from NS");
+    
+
+    /* Close server instance after tests complete */
+    rmResult = Rm_serviceCloseHandle(serviceHandle);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");    
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed"); 
+}
+
+void testCd(void)
+{
+    Rm_InitCfg          rmInitCfg;
+    Rm_ServiceHandle   *serviceHandle;
+    Rm_ServiceReqInfo   request;
+    Rm_ServiceRespInfo  response;
+    int32_t             rmResult;
+
+    MEM_TEST_START_STORE();      
+    memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
+    System_sprintf (rmInstName, "RM_Client_Delegate");
+    rmInitCfg.instName = rmInstName;
+    rmInitCfg.instType = Rm_instType_CLIENT_DELEGATE;
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    MEM_TEST_MID_STORE();
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("--- Client Delegate Inst Init/Del (No Static Policy) ----",
+                       "Pre Rm_Init (CD)     ", "Post Rm_Init (CD)    ", "Post Rm_Delete       ");
+
+
+    MEM_TEST_START_STORE();
+    rmInitCfg.instCfg.clientCfg.staticPolicy = (void *)rmStaticPolicy;
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    MEM_TEST_MID_STORE();
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("---- Client Delegate Inst Init/Del (Static Policy) ------",
+                       "Pre Rm_Init (CD)     ", "Post Rm_Init (CD)    ", "Post Rm_Delete       ");    
+
+
+    MEM_TEST_START_STORE();
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    /* Open service handle */
+    serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
+    /* Static allocation */
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameQos, 
+                 0, 1, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    MEM_TEST_MID_STORE();
+    /* Delete instance with deletion of pending transactions */
+    rmResult = Rm_serviceCloseHandle(serviceHandle);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");    
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("--- CD Inst Init/Del (Static Policy w/ Static Alloc) ----",
+                       "Pre Rm_Init (CD)     ", "Post Static Alloc Req", "Post Rm_Delete       "); 
+}
+
+void testClient(void)
+{
+    Rm_InitCfg          rmInitCfg;
+    Rm_ServiceHandle   *serviceHandle;
+    Rm_ServiceReqInfo   request;
+    Rm_ServiceRespInfo  response;
+    int32_t             rmResult;
+
+    MEM_TEST_START_STORE();      
+    memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
+    System_sprintf (rmInstName, "RM_Client");
+    rmInitCfg.instName = rmInstName;
+    rmInitCfg.instType = Rm_instType_CLIENT;
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    MEM_TEST_MID_STORE();
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("-------- Client Inst Init/Del (No Static Policy) --------",
+                       "Pre Rm_Init (Client) ", "Post Rm_Init (Client)", "Post Rm_Delete       ");
+
+
+    MEM_TEST_START_STORE();
+    rmInitCfg.instCfg.clientCfg.staticPolicy = (void *)rmStaticPolicy;
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    MEM_TEST_MID_STORE();
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("--------- Client Inst Init/Del (Static Policy) ----------",
+                       "Pre Rm_Init (Client) ", "Post Rm_Init (Client)", "Post Rm_Delete       ");    
+
+
+    MEM_TEST_START_STORE();
+    rmHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
+    /* Open service handle */
+    serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
+    /* Static allocation */
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameQos, 
+                 0, 1, 0, NULL, RM_TEST_TRUE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    MEM_TEST_MID_STORE();
+    /* Delete instance with deletion of pending transactions */
+    rmResult = Rm_serviceCloseHandle(serviceHandle);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");    
+    rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
+    MEM_TEST_END_PRINT("- Client Inst Init/Del (Static Policy w/ Static Alloc) --",
+                       "Pre Rm_Init (Client) ", "Post Static Alloc Req", "Post Rm_Delete       ");   
+}
+
+/* Test features for memory leaks using a Server, CD, and Client all running on a single DSP core. 
+ * The transport implemented between the instances is just direct function calls */
+void testServerCdClient(void)
+{
+    Rm_InitCfg          rmInitCfg;
+    char                serverName[RM_NAME_MAX_CHARS];
+    char                cdName[RM_NAME_MAX_CHARS];
+    char                clientName[RM_NAME_MAX_CHARS];
+    Rm_Handle           serverHandle, cdHandle, clientHandle;
+    Rm_TransportCfg     transCfg;
+    Rm_TransportHandle  serverToCd, cdToServer, cdToClient, clientToCd;
+    Rm_ServiceHandle   *serviceHandle;
+    Rm_ServiceReqInfo   request;
+    Rm_ServiceRespInfo  response;
+    int32_t             rmResult;
+
+
+    MEM_TEST_START_STORE();
+    memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
+    System_sprintf (serverName, "RM_Server");
+    rmInitCfg.instName = serverName;
+    rmInitCfg.instType = Rm_instType_SERVER;
+    rmInitCfg.instCfg.serverCfg.globalResourceList = (void *)rmGRL;
+    rmInitCfg.instCfg.serverCfg.linuxDtb = (void *)rmLinuxDtb;
+    rmInitCfg.instCfg.serverCfg.globalPolicy = (void *)rmGlobalPolicy;    
+    serverHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, serverName, "Initialization failed");  
+    MEM_TEST_MID_STORE();
+    rmResult = Rm_delete(serverHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, serverName, "Delete failed");
+    MEM_TEST_END_PRINT("----------- Server Inst Init/Del w/ Linux Dtb -----------",
+                       "Pre Rm_Init (Server) ", "Post Rm_Init (Server)", "Post Rm_Delete       ");
+
+    /* Init Server */
+    serverHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, serverName, "Initialization failed");
+    /* Init CD */
+    memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
+    System_sprintf (cdName, "RM_Client_Delegate");
+    rmInitCfg.instName = cdName;
+    rmInitCfg.instType = Rm_instType_CLIENT_DELEGATE;      
+    cdHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, cdName, "Initialization failed"); 
+    /* Init Client */
+    memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
+    System_sprintf (clientName, "RM_Client");
+    rmInitCfg.instName = clientName;
+    rmInitCfg.instType = Rm_instType_CLIENT;      
+    clientHandle = Rm_init(&rmInitCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, clientName, "Initialization failed");
+
+    /* Connect Server transports */
+    memset((void *)&transCfg, 0, sizeof(transCfg));
+    transCfg.rmHandle = serverHandle;
+    transCfg.remoteInstType = Rm_instType_CLIENT_DELEGATE;
+    transCfg.remoteInstName = cdName;
+    transCfg.appTransportHandle = NULL;
+    transCfg.transportCallouts.rmAllocPkt = rmLocalPktAlloc;
+    transCfg.transportCallouts.rmSendPkt = rmLocalPktSendRcv;
+    serverToCd = Rm_transportRegister(&transCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, serverName, "Client Delegate transport registration failed");
+    /* Connect Client transports */
+    transCfg.rmHandle = clientHandle;
+    transCfg.remoteInstType = Rm_instType_CLIENT_DELEGATE;
+    transCfg.remoteInstName = cdName;
+    clientToCd = Rm_transportRegister(&transCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, clientName, "Client Delegate transport registration failed");     
+    /* Connect CD transports */
+    transCfg.rmHandle = cdHandle;
+    transCfg.remoteInstType = Rm_instType_SERVER;
+    transCfg.remoteInstName = serverName;
+    transCfg.appTransportHandle = (Rm_AppTransportHandle) serverToCd;
+    cdToServer = Rm_transportRegister(&transCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, cdName, "Server transport registration failed");
+    transCfg.rmHandle = cdHandle;
+    transCfg.remoteInstType = Rm_instType_CLIENT;
+    transCfg.remoteInstName = clientName;
+    transCfg.appTransportHandle = (Rm_AppTransportHandle) clientToCd;
+    cdToClient = Rm_transportRegister(&transCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, cdName, "Client transport registration failed");
+    /* Reconfigure the Server and Client transports to CD with the CD transport handles for proper routing
+     * in the rmLocalPktSendRcv function */
+    transCfg.rmHandle = serverHandle;
+    transCfg.remoteInstName = cdName;
+    transCfg.appTransportHandle =(Rm_AppTransportHandle) cdToServer;
+    Rm_transportRegister(&transCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, serverName, "Client Delegate transport registration failed");
+    transCfg.rmHandle = clientHandle;
+    transCfg.remoteInstName = cdName;
+    transCfg.appTransportHandle = (Rm_AppTransportHandle) cdToClient;
+    Rm_transportRegister(&transCfg, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, clientName, "Client Delegate transport registration failed");    
+
+    /* Open service handle on Client to send requests to Server via Client Delegate */
+    serviceHandle = Rm_serviceOpenHandle(clientHandle, &rmResult);
+    ERROR_CHECK(RM_OK, rmResult, clientName, "Service handle open failed");
+
+  
+    /* Allocate a resource */
+    MEM_TEST_START_STORE();        
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 896, 1, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Allocate failed");   
+    MEM_TEST_MID_STORE();    
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 896, 1, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Free failed");
+    MEM_TEST_END_PRINT("--------------- Client Alloc/Free (via CD) --------------",
+                       "Pre Alloc            ", "Post Alloc Request   ", "Post Free            ");
+
+      
+    /* Perform multiple allocs to force the tree to combine nodes */
+    MEM_TEST_START_STORE(); 
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 900, 50, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 2000, 50, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 1000, 1000, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Allocate failed");
+    setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resNameGpQ, 
+                 950, 50, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Allocate failed"); 
+    MEM_TEST_MID_STORE();         
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 1000, 500, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Free failed");     
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 1500, 550, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Free failed");   
+    setRmRequest(&request, Rm_service_RESOURCE_FREE, resNameGpQ, 
+                 900, 100, 0, NULL, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "Free failed");  
+    MEM_TEST_END_PRINT("---------- Client Multiple Alloc/Free (via CD) ----------",
+                       "Pre Alloc            ", "Post Alloc Requests  ", "Post Free            ");
+    
+     
+    /* Map a resource in the NameServer */
+    MEM_TEST_START_STORE();  
+    setRmRequest(&request, Rm_service_RESOURCE_MAP_TO_NAME, resNameGpQ, 
+                 5000, 1, 0, nsNameFavQ, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "NameServer map failed");
+    MEM_TEST_MID_STORE();        
+    setRmRequest(&request, Rm_service_RESOURCE_UNMAP_NAME, NULL, 
+                 0, 0, 0, nsNameFavQ, RM_TEST_FALSE, &response);
+    serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
+    ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, clientName, "NameServer unmap failed");
+    MEM_TEST_END_PRINT("---------- Client NameServer Map/Unmap (via CD) ---------",
+                       "Pre NS Map           ", "Name Mapped to NS    ", "Name Unmapped from NS");
+
+
+    /* Cleanup */
+    rmResult = Rm_serviceCloseHandle(serviceHandle);
+    ERROR_CHECK(RM_OK, rmResult, clientName, "Service handle close failed");       
+    rmResult = Rm_transportUnregister(serverToCd);
+    ERROR_CHECK(RM_OK, rmResult, serverName, "Client Delegate transport unregister failed");
+    rmResult = Rm_transportUnregister(cdToServer);
+    ERROR_CHECK(RM_OK, rmResult, cdName, "Server transport unregister failed");
+    rmResult = Rm_transportUnregister(cdToClient);
+    ERROR_CHECK(RM_OK, rmResult, cdName, "Client transport unregister failed");
+    rmResult = Rm_transportUnregister(clientToCd);
+    ERROR_CHECK(RM_OK, rmResult, clientName, "Client Delegate transport unregister failed");
+    rmResult = Rm_delete(serverHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, serverName, "Delete failed");
+    rmResult = Rm_delete(cdHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, cdName, "Delete failed");
+    rmResult = Rm_delete(clientHandle, RM_TEST_TRUE);
+    ERROR_CHECK(RM_OK, rmResult, clientName, "Delete failed");    
+}
+
+void testSharedServerClient(void)
+{
+
+}
+
+void main(Int argc, Char* argv[])
+{
+    Rm_InitCfg rmInitCfg;
+    int32_t    rmResult;
+    int        status;
 
     System_printf ("*********************************************************\n");
     System_printf ("******************** RM Memory Test *********************\n");
@@ -511,7 +1043,17 @@ void main(Int argc, Char* argv[])
     }
 
     if (coreNum == SYSINIT) {
-        MEM_PRE_PRINT("------------------ Server Inst Init/Del -----------------", "Pre Rm_Init (Server) ");
+        /* Test individual instance init/deletes */
+        testServer();
+        testCd();
+        testClient();
+        
+        /* Test Server-CD-Client interaction for memory leaks all from a single core */
+        testServerCdClient();
+        /* Test Shared Server-Client interaction for memory leaks */
+        testSharedServerClient();
+        
+        /* Create Server for multicore interaction memory tests */
         memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
         System_sprintf (rmInstName, "RM_Server");
         rmInitCfg.instName = rmInstName;
@@ -520,153 +1062,18 @@ void main(Int argc, Char* argv[])
         rmInitCfg.instCfg.serverCfg.globalPolicy = (void *)rmDspPlusArmPolicy;
         rmHandle = Rm_init(&rmInitCfg, &rmResult);
         ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
-        MEM_MID_PRINT("Post Rm_Init (Server)");      
-        rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
-        MEM_END_PRINT("Post Rm_Delete       ");     
-
-        rmHandle = Rm_init(&rmInitCfg, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
-        MEM_PRE_PRINT("--------------- Open/Close Service Handle ---------------", "Pre Service Hnd Open ");
-        /* Open service handle */
-        serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
-        MEM_MID_PRINT("Service Hnd Opened   ");
-        rmResult = Rm_serviceCloseHandle(serviceHandle);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");
-        MEM_END_PRINT("Service Hnd Closed   ");
-        rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");        
-
-        MEM_PRE_PRINT("-------------- Server Inst Init/Del w/ Alloc ------------", "Pre Rm_Init (Server) ");
-        rmHandle = Rm_init(&rmInitCfg, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
-        /* Open service handle */
-        serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
-        /* Allocate a resource to add a node to a resource tree */
-        setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                     896, 1, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        MEM_MID_PRINT("Post Alloc Req       ");
-        /* Delete instance making sure allocation cleaned up properly from resource tree */
-        rmResult = Rm_serviceCloseHandle(serviceHandle);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");        
-        rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
-        MEM_END_PRINT("Post Rm_Delete       ");
-
-        /* Service request memory tests */
-        rmHandle = Rm_init(&rmInitCfg, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
-        /* Open service handle */
-        serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
-
-        MEM_PRE_PRINT("-------------------- Server Alloc/Free ------------------", "Pre Alloc            ");        
-        /* Allocate a resource to add a node to a resource tree */
-        setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                     896, 1, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
-        MEM_MID_PRINT("Post Alloc Request   ");
-        setRmRequest(&request, Rm_service_RESOURCE_FREE, resourceNameGpQ, 
-                     896, 1, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");        
-        MEM_END_PRINT("Post Free            ");
-
-        MEM_PRE_PRINT("--------------- Server Multiple Alloc/Free --------------", "Pre Alloc            ");        
-        /* Perform multiple allocs to force the tree to combine nodes */
-        setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                     900, 50, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
-        setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                     2000, 50, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
-        setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                     1000, 1000, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");
-        setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                     950, 50, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Allocate failed");        
-        MEM_MID_PRINT("Post Alloc Requests  ");
-        setRmRequest(&request, Rm_service_RESOURCE_FREE, resourceNameGpQ, 
-                     1000, 500, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");     
-        setRmRequest(&request, Rm_service_RESOURCE_FREE, resourceNameGpQ, 
-                     1500, 550, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");   
-        setRmRequest(&request, Rm_service_RESOURCE_FREE, resourceNameGpQ, 
-                     900, 100, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "Free failed");           
-        MEM_END_PRINT("Post Free            ");
-
-        MEM_PRE_PRINT("-------------- Server NameServer Map/Unmap --------------", "Pre NS Map           ");        
-        /* Map a resource in the NameServer */
-        setRmRequest(&request, Rm_service_RESOURCE_MAP_TO_NAME, resourceNameGpQ, 
-                     5000, 1, 0, nameServerNameFavQ, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "NameServer map failed");
-        MEM_MID_PRINT("Name Mapped to NS    ");
-        setRmRequest(&request, Rm_service_RESOURCE_UNMAP_NAME, NULL, 
-                     0, 0, 0, nameServerNameFavQ, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        ERROR_CHECK(RM_SERVICE_APPROVED, response.serviceState, rmInstName, "NameServer unmap failed");
-        MEM_END_PRINT("Name Unmapped from NS");
-
+     
         /* Signal to remote cores that Server instance has passed all initialization
          * memory tests and is ready */
         isRmInitialized[0] = 1;
         Osal_rmEndMemAccess((void *)isRmInitialized,sizeof(isRmInitialized));
     }
     else {
-        MEM_PRE_PRINT("-------- Client Inst Init/Del (No Static Policy) --------", "Pre Rm_Init (Client) ");        
+        /* Create Client for multicore interaction memory tests */
         memset((void *)&rmInitCfg, 0, sizeof(rmInitCfg));
         System_sprintf (rmInstName, "RM_Client%d", coreNum);
         rmInitCfg.instName = rmInstName;
         rmInitCfg.instType = Rm_instType_CLIENT;
-        rmHandle = Rm_init(&rmInitCfg, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
-        MEM_MID_PRINT("Post Rm_Init (Client)"); 
-        rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
-        MEM_END_PRINT("Post Rm_Delete       ");
-
-        MEM_PRE_PRINT("--------- Client Inst Init/Del (Static Policy) ----------", "Pre Rm_Init (Client) ");
-        rmInitCfg.instCfg.clientCfg.staticPolicy = (void *)rmDspPlusArmPolicy;
-        rmHandle = Rm_init(&rmInitCfg, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
-        MEM_MID_PRINT("Post Rm_Init (Client)"); 
-        rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
-        MEM_END_PRINT("Post Rm_Delete       ");
-
-        MEM_PRE_PRINT("- Client Inst Init/Del (Static Policy w/ Static Alloc) --", "Pre Rm_Init (Client) ");
-        rmHandle = Rm_init(&rmInitCfg, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");
-        /* Open service handle */
-        serviceHandle = Rm_serviceOpenHandle(rmHandle, &rmResult);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle open failed");
-        /* Static allocation */
-        setRmRequest(&request, Rm_service_RESOURCE_ALLOCATE_INIT, resourceNameGpQ, 
-                     897, 1, 0, NULL, RM_TEST_TRUE, &response);
-        serviceHandle->Rm_serviceHandler(serviceHandle->rmHandle, &request, &response);
-        MEM_MID_PRINT("Post Static Alloc Req");
-        /* Delete instance with deletion of pending transactions */
-        rmResult = Rm_serviceCloseHandle(serviceHandle);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Service handle close failed");    
-        rmResult = Rm_delete(rmHandle, RM_TEST_TRUE);
-        ERROR_CHECK(RM_OK, rmResult, rmInstName, "Delete failed");
-        MEM_END_PRINT("Post Rm_Delete       ");
-
         rmHandle = Rm_init(&rmInitCfg, &rmResult);
         ERROR_CHECK(RM_OK, rmResult, rmInstName, "Initialization failed");