a value as large as 9999999
A range of only 10 million doesn't need a "long long".
An ordinary signed long (32 bits) covers the range -2147483648 to +2147483647 decimal.
An unsigned long will cover 0..4294967296 decimal.
void test(int sizeIn){
What is the value of "sizeIn"? Where does it come from?
I don't see why you don't just have a fixed-size receiver buffer, bit enough to contain a single "long".