
You can use command cleanipc to clear or delete the old shared memory, semaphores and events flags from the operating system for SAP system. You need to logged as SID adm to authorized use of cleanipc. The command is cleanipc NN remove. NN is stand for system number.
> cleanipc NN remove Show/Cleanup SAP-IPC-Objects V2.3, 94/01/20 =========================================== Running SAP-Systems (Nr)...: ---------------------------------------------------------- ---- Clear IPC-Objects of Sap-System 7 ------------------ ---------------------------------------------------------- OsKey: 10734 0x000029ee Shared Memory Key: 34 removed OsKey: 20726 0x000050f6 Semaphore Key: 26 removed OsKey: 58900107 0x0382be8b SCSA Shared Memory Key: 58900000 removed Number of IPC-Objects...........: 3 Number of removed IPC-Objects...: 3
You will need to execute the command again to make sure the number of removed IPC-Objects is 0.
> cleanipc NN remove Show/Cleanup SAP-IPC-Objects V2.3, 94/01/20 =========================================== Running SAP-Systems (Nr)...: ---------------------------------------------------------- ---- Clear IPC-Objects of Sap-System 7 ------------------ ---------------------------------------------------------- Number of IPC-Objects...........: 0 Number of removed IPC-Objects...: 0




how to clean memory in sap system at windows level