Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.3
xen-tscinfo
xen-valgrind.c
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xen-valgrind.c of Package xen-tscinfo
#include <unistd.h> #include <errno.h> #include <stdlib.h> #include <stdio.h> #include <xenctrl.h> #if XEN_DOMCTL_INTERFACE_VERSION > 0x0000000a && XEN_DOMCTL_INTERFACE_VERSION < 0x00000010 #define have_xadc #endif struct x { unsigned short s; #if defined(have_xadc) struct xen_arch_domainconfig config; #endif unsigned char b; }; int main(void) { void *p1, *p2; struct xen_domctl_createdomain a = { }; struct xen_domctl_createdomain a2[2] = { }; #if defined(have_xadc) struct xen_arch_domainconfig c = {}; struct xen_arch_domainconfig c2[2] = {}; #endif struct x x = { }; struct x x2[2] = { }; p1 = calloc(1, sizeof(x)); p2 = calloc(1, sizeof(x)); printf("%p %p\n", p1, p2); printf("&a: %p, sizeof %zu\n", &a , sizeof(a)); printf("&a2: %p, sizeof %zu\n", &a2, sizeof(a2)); #if defined(have_xadc) printf("&c: %p, sizeof %zu\n", &c , sizeof(c)); printf("&c2: %p, sizeof %zu\n", &c2, sizeof(c2)); #endif printf("&x: %p, sizeof %zu\n", &x , sizeof(x)); printf("&x2: %p, sizeof %zu\n", &x2, sizeof(x2)); printf("&a2.1: %p\n", &a2[0]); #if defined(have_xadc) printf("&a2.1.c: %p\n", &a2[0].config); #endif printf("&a2.2: %p\n", &a2[1]); #if defined(have_xadc) printf("&a2.2.c: %p\n", &a2[1].config); #endif printf("&x2.1: %p\n", &x2[0]); #if defined(have_xadc) printf("&x2.1.c: %p\n", &x2[0].config); #endif printf("&x2.1.b: %p\n", &x2[0].b); printf("&x2.2: %p\n", &x2[1]); #if defined(have_xadc) printf("&x2.2.c: %p\n", &x2[1].config); #endif printf("&x2.2.b: %p\n", &x2[1].b); return 0; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor