Select Git revision
List.cpp
Forked from
gmsh / gmsh
Source project has a limited visibility.
-
Christophe Geuzaine authored
Changed the initial allocation from liste->nmax = ((n - 1) / liste->incr + 1) * liste->incr, which does not allow us to allocate lists smaller than iste->incr, to liste->nmax = n; With this change, when we do "List_Create(1, N, sizeof(blah))", we initially only allocate sizeof(blah) instead of N*sizeof(blah).
Christophe Geuzaine authoredChanged the initial allocation from liste->nmax = ((n - 1) / liste->incr + 1) * liste->incr, which does not allow us to allocate lists smaller than iste->incr, to liste->nmax = n; With this change, when we do "List_Create(1, N, sizeof(blah))", we initially only allocate sizeof(blah) instead of N*sizeof(blah).