On 11.07.19 13:19, Cris Almaraz via Xenomai wrote: > Thank you for the fast answers! > > Enabling the extensions ( - -std=gnu++11) has fixed the issue for me. > > Anyhow, I noticed that I still cannot use the set_config_tunable() to > set the mem_pool_size. I configure it as described below, but I still > get the warning > > WARNING: [APP] heapobj_init() failed for xxx bytes, raise --mem-pool-size? > > If I use the command line option --mem-pool-size it works without any > issues, but I´d like to include it in the code.
You may call set_config_tunable too late, after __config_done was set to 1. > > Also, as secondary issue, I cannot use the syntax of 1G to define the > size, as G is not defined (error below). That´s why I have the "GBYTE" > definition. > > error: unable to find numeric literal operator ‘operator"" G’ > > #define GBYTE (1024*1024*1024) > static int my_tune(void){ > set_config_tunable(mem_pool_size, 1*GBYTE); > printf("mem pool size=%ld\n",get_config_tunable(mem_pool_size)); > return 0; > } > > static struct setup_descriptor my_setup = { > .name = "mySetup", > .tune = my_tune, > }; > > user_setup_call(my_setup); > > Any ideas on these points? > Please share complete reproduction cases with build instructions. I can't reproduce the issues based on the above information. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux