Green Hills Integrity Dynamic memory allocation
Asked Answered
L

1

0

I have a requirement which need to repeatedly allocate and deallocate memory. Currently trying it on Integrity ARM simulator.

I have created two tasks : First task(encoder): receives video data from a socket and encodes it and send it to second task. Second task(decoder): receives data from encoder and decodes it. In this decoding process it dynamically allocates memory and after decoding deallocates memory.

After some time decoder task is suspended and cannot read protected memory error comes. How can i resolve this dynamic memory issue? I dont want to use fixed size arrays.

Thanks

Liveried answered 11/11, 2014 at 17:42 Comment(0)
T
2

I see this is an old post and you probably already found a fix but I've seen a similar behaviour in Integrity when the memory reserved for the virtual address space in the int file is not sufficient. Try increasing the MemoryPoolSize and/or HeapSize in your VAS int file. Also check again that the same amount of memory you allocate is later properly deallocated. I know the error you see doesn't seem to be related to a lack of memory but I've seen Integrity behave very strange when memory for the VAS is exhausted. You can check your memory usage to see if you are approaching the limit by using INDRT2 debug session and the 'lt' command which will report the Used/Size memory pool size per VAS.

Good luck!

Tabloid answered 27/2, 2015 at 20:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.