File: test_C_16.c

package info (click to toggle)
ccmalloc 0.4.0-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 488 kB
  • ctags: 446
  • sloc: ansic: 4,493; sh: 523; makefile: 105; cpp: 89
file content (17 lines) | stat: -rw-r--r-- 308 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Under SunOS and Solaris a double must be 8 Byte aligned. This means
 * we have to align all data to 8 Bytes :-(
 */

#include <stdlib.h>

struct Test { double d; };

int main()
{
  struct Test * test = (struct Test*) malloc(sizeof(struct Test));
  test -> d = 0.0;
  free(test);

  exit(0);
  return 1;
}