Why are you calling malloc anyway?

Why not do this.
Code:
static int ShellSortGaps[] = {
  1, 3, 7, // etc
};