zhangyu-duck opened a new pull request, #21364: URL: https://github.com/apache/nuttx/pull/21364
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary g_irqrevmap stores IRQ numbers but was declared as int[], wasting memory. Change its element type to irq_t, which is already sized by NR_IRQS to hold the largest IRQ number, so each entry shrinks with no truncation risk. ## Impact Common code: include/nuttx/irq.h and sched/irq/irq_attach.c. Only affects configurations with CONFIG_ARCH_NUSER_INTERRUPTS (where g_irqrevmap is defined); NDX_TO_IRQ() still returns the same IRQ value. No API or Kconfig changes. Memory usage of g_irqrevmap is reduced when irq_t is narrower than int. ## Testing Built triboard_tc4x9_com:nsh (TC4xx, cmake) and a2g-tc397-5v-tft:nsh (TC3xx) with tricore-elf-gcc on Ubuntu host. Passes checkpatch. Tested on both TC4xx (TC4x9) and TC3xx (TC397) boards: system boots normally and ostest passes. ``` nsh> ostest ... ostest_main: Exiting with status 0 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
