That's the worst way to set up a Time Machine Backup, IMO.
If your hard drive fails, your backup is gone, too.
If you want to upgrade your hard drive, you'll need an external enclosure for restoring data.
It'll limit your hard drive space to a tiny amount (at least from my point of view).
Your computer will become slower while backup is running (because the OS and the backup use the same hard drive).
I would highly discourage you from doing this. But if you must, partition your hard drive for best performance.