Where CHECK ALLOC gets info?

In 2000, Check Alloc gives a summary that is the accurate size and "unused" information of my database. I have tried many other tables (like sysindexes,etc.) and all of them give data that is too large. In 2000, the max database size is 2GB but the tables show that my database data is 2.4 GB. The actual Windows file size is 2Gb, the transaction log is 200 mb. It does not add up no matter how I sum up the columns.

It seems the extents, being mixed or not, is responsible since the tables don't account for the data space that is shared with other tables. They show data,reserved,used spaces that added up are more than can fit in the physical space.

Where is the source data for CHECK ALLOC? Somehow it knows how to get it right.

(I'm creating a CSV and CHECK ALLOC does not create a proper table. My database accumulates real time data and fills up and I need to know when it is full. The tables give data that does not provide that info. Only check alloc gives the actual extents from which I can calculate actual space used. Stored procedures like sp space_used does not.)