Alignment and padding of data inside a blob
===

I'm using a large blob (allocated memory) to store data continuously in the memory.

I want data inside the blob to be organized like this:

> | data1 type | data1 | data2 type | data2 | dataN type | dataN |

`dataN type` is an `int` that I use in a switch to convert the `dataN` to the appropriate type.

The problem is I want to keep data properly aligned to do so I want to enforce all data inside the blob to be 8-bytes packed (I chosen 8 bytes for packing because it will probably keep data properly aligned?), this way data will tightly packed (there won't be holes between data->data types because of alignment).

I tried this:

    #pragma pack(8)
    class A
    {
    public:
        short b;
        int x;
        char v;
    };

But it doesn't work because using `sizeof(A)` I get 12 bytes instead of the expected 16 bytes. 

P.S: Is there any data type larger than 8 bytes in either x86 or x64 architectures?