view Resources/Platforms/c_flexmember.c @ 162:c2ea17961dfc

Running transactions in "Serializable" isolation level
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Mar 2018 12:27:20 +0100
parents 4968c70ba17e
children
line wrap: on
line source

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
struct s { int n; double d[]; };

int main ()
{
  int m = getchar ();
  struct s *p = malloc (offsetof (struct s, d)
                        + m * sizeof (double));
  p->d[0] = 0.0;
  return p->d != (double *) NULL;
}