在 2024/5/7 下午5:52, Michael Tokarev 写道:
07.05.2024 05:22, Song Gao wrote:for (i = 1; i < nb_numa_nodes; i++) { MemoryRegion *nodemem = g_new(MemoryRegion, 1); - ramName = g_strdup_printf("loongarch.node%d.ram", i);+ g_autofree char *ramName = g_strdup_printf("loongarch.node%d.ram", i);Can't this be a fixed-size buffer on stack? Maybe I'm old-minded, but such obviously fixed and very small allocations on the heap hurt my eyes ;)
I had send v2 patch. Thanks. Song Gao
/mjt