AnsweredAssumed Answered

FNET mempool corruption

Question asked by Dec Arnold on Nov 24, 2015
Latest reply on Nov 27, 2015 by Dec Arnold

Hello,

 

I've had problems with corruption of the fnet mempool when all the memory gets allocated.

I managed to recreate the problem by doing the following...

 

1. initialise the mempool with a small amount of memory 16 byte aligned
2. The 1st call to fnet_mempool_free_mem_status returns 992
3. malloc 800 bytes
4. The 2nd call to fnet_mempool_free_mem_status returns 176 as expected.
5. allocate 160 bytes, it returns a valid pointer
6. The 3rd call to fnet_mempool_free_mem_status returns 176 which is wrong as there isn't any memory left
7. Free the memory allocated in step 3
8. The 4th call to fnet_mempool_free_mem_status returns 992 which is wrong because the memory allocated in step 5 is still allocated.

 

I only noticed this as I had to drastically cut back on the amount of memory available to FNET on my test system.

 

Before I start digging deeper I wondered if anyone else experienced the above ?

 

(The rest of the stack isn't running during the above test)

 

Thanks

Dec

Outcomes