FNET mempool corruption

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FNET mempool corruption

996件の閲覧回数
paul1962
Contributor I

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

ラベル(1)
0 件の賞賛
返信
1 返信

854件の閲覧回数
paul1962
Contributor I

Above has been traced to a fault in the alloc/free routines in fnet_mempool.c

Maybe it's only a problem for those with limited memory.

If anyone is interested I'll post details when I'm next back at work.

0 件の賞賛
返信