On Mon, 27 Mar 2023 at 14:06, Steffen Möller <steffen_moel...@gmx.de> wrote:
> Would this be something that we could address together with > https://github.com/features/copilot? I don't know if it would help, being trained on other code might not help here, I doubt that what we do is at all common. An example, see the encoder struct here, with sub-sections for HAL and Not-HAL: https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/drivers/mesa-hostmot2/hostmot2.h#L272 Then the mallocs: https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/drivers/mesa-hostmot2/encoder.c#L402 And https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/drivers/mesa-hostmot2/encoder.c#L448 Whereas, for example, the equivalent software encoder has a single struct (which is, admittedly largely made up of HAL pins) https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/encoder.c#L103 Which is all hal_mallocc-ed: https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/encoder.c#L233 In the case of encoder.c this probably makes very little difference, it is using about 7 pins-worth of HAL memory for internal variables and has 26 real HAL pins per instance. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers