[Nauty] Undefined behavior in nauty (Going over bounds)
Mathieu Dutour
mathieu.dutour at gmail.com
Mon Nov 16 22:59:59 AEDT 2020
On Mon, 16 Nov 2020 at 12:38, <keith.briggs at bt.com> wrote:
> Could this not be done by having int* p in the struct, and using two
> malloc calls when creating a new permnode?
> Keith
>
Yes of course.
But that would be disadvantageous.
malloc/free calls are expensive. One wants to have as few of them as
possible.
The "struct hack" was introduced to diminish the number of malloc calls.
The "flexible array members" recognized why this was done at all and put it
in
the standard.
Mathieu
More information about the Nauty
mailing list