On 04/08/15 20:01, [email protected] wrote:
+ /* Reserve memory for args from shared mem */
+ shm = odp_shm_reserve("cls_shm_args", sizeof(appl_args_t),
+ ODP_CACHE_LINE_SIZE, 0);
+ args = odp_shm_addr(shm);
+
+ if (args == NULL) {
+ EXAMPLE_ERR("Error: shared mem alloc failed.\n");
+ exit(EXIT_FAILURE);
+ }
+
That is not good I think:
void *odp_shm_addr(odp_shm_t shm)
{
uint32_t i;
i = from_handle(shm);
if (i > (ODP_CONFIG_SHM_BLOCKS - 1))
return NULL;
return odp_shm_tbl->block[i].addr;
}
There is might be some block which was not freed it's addr.
You need to check shm == ODP_SHM_INVALID.
Thanks,
Maxim.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp