I had some strange issues with my code and it turned out to be that I raad a struct wrongly and thus all following structs would not give me the proper value.
The unexplicable and utterly strange problem arose when I tried to fix it and set it to read 12 bytes. Look at the snipped below. the size of the strcture (given by sizeof()) was 12. When reading it with 8, 9, 10, or 11 in size, it wouldn't even be visible in the task manager's memory monitor, but once I set it to 12 -- 2GB is allocated out of the blue and bad_alloc is thrown.