Green Hills Integrity Dynamic Memory Allocation

I have a requirement that needs to be allocated and freed up memory many times. He is currently trying to use the Integrity ARM simulator.

I created two tasks: The first task (encoder): receives video data from the socket and encodes it and sends it to the second task. The second task (decoder): receives data from the encoder and decodes it. In this decoding process, it dynamically allocates memory and, after decoding, frees up memory.

After some temporary decoder task is suspended and the protected memory error cannot be read. How can I solve this problem with dynamic memory? I do not want to use fixed size arrays.

thank

0
c ++ memory-management dynamic integrity rtos
Nov 11 '14 at
source share
1 answer

I see that this is an old post, and you probably already found a fix, but I saw a similar behavior in Integrity, when the memory reserved for the virtual address space in the int file is not enough. Try increasing the size of MemoryPoolSize and / or HeapSize in your VAS file. Also check again that the same amount of memory that you allocate is later freed correctly. I know that the error you see does not seem to be related to a lack of memory, but I saw how Integrity behaves very strange when the memory for VAS is exhausted. You can check the memory usage to see if you are approaching the limit using the INDRT2 debugging session and the "lt" command, which will report the used / size memory pool size for each VAS.

Good luck

+2
Feb 27 '15 at 20:38
source share



All Articles