Re: [Emc-developers] HAL shared memory and the mis-use of hal_malloc

2023-03-26 Thread Sebastian Kuzminsky
On March 26, 2023 5:26:29 PM MDT, andy pugh wrote: >It's a tempting thing to do, it keeps the data structures neat, and means >that you don't have to free on exit, as the whole HAL memory is freed on >exit. Non-hal memory (eg from malloc) is also freed when the process exits (it's more

[Emc-developers] HAL shared memory and the mis-use of hal_malloc

2023-03-26 Thread andy pugh
I am working on a HAL driver at the moment, and have started to be concerned about mis-use(?) of hal_malloc. Looking at the hostmot2 code the data structures are carefully split into HAL pins and other data. The HAL pins parts are hal_malloc-ed and the data parts are rtapi_kmalloc-ed (which is