To free HPS memory, the application calls sysctl() as follows:
int mib[4]; unsigned long ptrs[15]; int ret; mib[0] = CTL_OS2; mib[1] = PF_INET; mib[2] = IPPROTO_IP; mib[3] = OS2_MEMMAPIO; ret = sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, 0, ptrs, sizeof(ptrs));
The ptrs parameter is the list of array of pointers returned on the allocation call.