Problem with void CyU3PMemAlloc and void CyU3PMemFree | Cypress Semiconductor
Problem with void CyU3PMemAlloc and void CyU3PMemFree
I have been using CyU3PMemAlloc for allocating memory for uint8_t pointers of varying sizes. In case where I use the combination of CyU3PMemAlloc and CyU3PMemFree for each iteration, I am unsure if the used memory is being freed as they doesn't have any return value. The problem is when i use CyU3PMemAlloc for more iterations, it uses adjacent memory locations and at some point it allocates null address to my pointers.
I check for a valid pointer by printing &data and checking whether a valid address is allocated.
If anyone had faced the same issue please help.