No need to call malloc or low-level file functions, just use datasets. T6 is a seven-field dataset (where element 0 is the timestamp and also the beginning of the struct).

dataStr can be used to return a pointer to your T6 struct.
Quote
For storing complex data such as structs, use a sufficient record size plus 8 bytes for the timestamp, and copy the struct to dataStr(Handle,Record,1). If a separate timestamp is not needed, or if it is part of the struct as for the T1..T8 structs, the struct can be stored to dataStr(Handle,Record,0).
https://www.zorro-project.com/manual/en/data.htm