How to control a HDF file to a pre-defined size

I'm writing to ask you a question of HDF file creating with a certain size
(5GB. et al).

As we know, the H5FCreate() function provided the *creat_properties *to
defined the
Offset and Length information while file's creating. But the most example
just use a H5P_DEFAULT param instead.

Well, i am suppose to create a new HDF file with a certain disk size (5GB),
how could
i use the H5Pget_size() function to define its Offset and Length, which i
not very clear
with the concept of them actually.

Furthermore, i think my problem could be treat at a another angle , that
create a DEFAULT
HDF file first, and get the size of it after several Datasets were
writing into it , until the size
of file reached a pre-defined size (5GB).

Any advertising or samples will be sincerely appreciate~

Best,
Xi