News for hackers. Stuff that matters.
Re:Zig Performance Tracking Dashboard by hawski on Monday December 06, 2021 @12:35PM (#29462836)
Isn't your example code a stack allocated array? Flexible array members would rather be:

  struct Foo {
    int len;
    int data[];
  } *foo = malloc(sizeof(struct Foo) + n*sizeof(foo->data[0]));
  foo->len=n;

There are no comments on this comment yet.