[RFC v3 1/3] eal/lcore: add topology based functions
Varghese, Vipin
Vipin.Varghese at amd.com
Mon Nov 4 04:13:04 CET 2024
Snipped
>
> On Wed, 30 Oct 2024 11:11:31 +0530
> Vipin Varghese <vipin.varghese at amd.com> wrote:
>
> > + if (topo_cnfg.io) {
> > + free(topo_cnfg.io);
> > + topo_cnfg.io = NULL;
> > + }
>
> No need to check for NULL before calling free.
Thank you Stepehen on this, the reason why we specifically added to address 2 scenarios
1. as pointed out by Wathsala where System Level Cache will be disabled; where L3 will be not available at all
2. for version where hwloc does not detect the specific cache level.
By checking the NULL we can avoid such cases.
Note: I will recheck and add|remove this in v4
More information about the dev
mailing list