ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
28 марта
730561 Топик полностью
бомж (24.01.2017 13:27, просмотров: 278) ответил SciFi на Кстати, если вызывается только malloc(), а free() не используется, то такой malloc() делается самостоятельно за полчаса в 30 строчек.
К сожалению, free() и realloc() используются /* Run the toolkit start device functions */ lRet = cifXStartDevice(ptDevInstance); if(CIFX_NO_ERROR == lRet) { /* Lock tkit global data access against reentrancy*/ OS_EnterLock(g_pvTkitLock); /* Increment device count */ ++g_ulDeviceCount; /* Create new list entry */ g_pptDevices = (PDEVICEINSTANCE*)realloc((void*)g_pptDevices, g_ulDeviceCount * (uint32_t)sizeof(*g_pptDevices)); /* Add the new entry to the device list */ g_pptDevices[g_ulDeviceCount - 1] = ptDevInstance; /* Setup interrupts if as given during cifXStartDevice() */ if(0 != (ptDevInstance->fIrqEnabled)) { /* Perform a dummy interrupt cycle to get handshake flags in Sync for proper operation */ if(CIFX_TKIT_IRQ_DSR_REQUESTED == cifXTKitISRHandler(ptDevInstance, 1)) cifXTKitDSRHandler(ptDevInstance); #ifndef CIFX_TOOLKIT_MANUAL_IRQ_ENABLE OS_EnableInterrupts(ptDevInstance->pvOSDependent); cifXTKitEnableHWInterrupt(ptDevInstance); #endif /* CIFX_TOOLKIT_MANUAL_IRQ_ENABLE */ } /* Done with the initialisation */ OS_LeaveLock(g_pvTkitLock); } return lRet;
memento mori