Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: Issue in dynamic memory allocation

$
0
0
Hi all, I am using e2 studio Version: 4.3.1.001 Q 1. How to create byte pool using BSP on synergy S7G2  ? Q 2. What should be the value of third argument i.e. pool_start (Starting address of the memory pool) if it is to be created using tx_byte_pool_create API?  Q 3. I have created the byte pool using tx_byte_pool_create api in blinky_thread_entry function on S7G2 with threadX RTOS. When I tried to allocate the memory using tx_byte_allocate ( where i passed the fourth argument waiting time as TX_NO_WAIT ) it returns 16 which indicate the service was unable to allocate the memory within the specified time to wait. If I pass the fourth argument waiting time as TX_WAIT_FOREVER then code stuck forever. What could possibly go wrong? tx_byte_pool_create(&my_pool,"my_pool_name", (void *) 0x500000, 3072); status_1 = tx_byte_allocate( &my_pool, (void **)&memory_ptr, 512, TX_NO_WAIT); if(TX_SUCCESS == status_1) { } Thank you :)   

Viewing all articles
Browse latest Browse all 59170