accelarator 3D card memory access

I wish to know the amount of free memory on 3D card I have left, for large texture purpose.

Does anybody knows how to do this, in OpenGl or another ?

This way I would know how big can be my texture, to be stored on 3d card memory, and therefore have good performances.

Thanx for all =)