#include <stdio.h>
#include <stdlib.h>
struct mblock {
void *hybrid_data;
};
struct hybrid_map {
unsigned int hybrid_zone_id;
unsigned int chunk_index[32768];
};
int main(void) {
struct mblock *mblk;
struct hybrid_map *hmap;
mblk
= malloc(sizeof(struct mblock
)); hmap = mblk->hybrid_data;
printf("mblock: %p, hmap: %d\n", mblk
, sizeof(hmap
)); printf("mblk->hybrid_zone_id: %u\n", sizeof(hmap
->hybrid_zone_id
));
printf("mblock: %p, hmap: %d\n", mblk
, sizeof(hmap
)); printf("mblk->hybrid_zone_id: %u\n", sizeof(hmap
->hybrid_zone_id
));
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnN0cnVjdCBtYmxvY2sgewoJCgl2b2lkICpoeWJyaWRfZGF0YTsKfTsKCnN0cnVjdCBoeWJyaWRfbWFwIHsKCXVuc2lnbmVkIGludCBoeWJyaWRfem9uZV9pZDsKCXVuc2lnbmVkIGludCBjaHVua19pbmRleFszMjc2OF07Cn07CgppbnQgbWFpbih2b2lkKSB7CgkKCXN0cnVjdCBtYmxvY2sgKm1ibGs7CglzdHJ1Y3QgaHlicmlkX21hcCAqaG1hcDsKCW1ibGsgPSBtYWxsb2Moc2l6ZW9mKHN0cnVjdCBtYmxvY2spKTsKCWhtYXAgPSBtYmxrLT5oeWJyaWRfZGF0YTsKCQoJcHJpbnRmKCJtYmxvY2s6ICVwLCBobWFwOiAlZFxuIiwgbWJsaywgc2l6ZW9mKGhtYXApKTsKCXByaW50ZigibWJsay0+aHlicmlkX3pvbmVfaWQ6ICV1XG4iLCBzaXplb2YoaG1hcC0+aHlicmlkX3pvbmVfaWQpKTsKCQoJZnJlZShtYmxrKTsKCQoJcHJpbnRmKCJtYmxvY2s6ICVwLCBobWFwOiAlZFxuIiwgbWJsaywgc2l6ZW9mKGhtYXApKTsKCXByaW50ZigibWJsay0+aHlicmlkX3pvbmVfaWQ6ICV1XG4iLCBzaXplb2YoaG1hcC0+aHlicmlkX3pvbmVfaWQpKTsKCQoJcmV0dXJuIDA7Cn0=