1. Virtual memory is a memory management technique that provides from windows system.
DRAM is a limited resource, whereas for most practical purposes, virtual memory is unlimited.
When the memory being used by all the existing processes exceeds the available RAM, the operating system moves pages of one or more virtual address spaces to the computer’s hard disk. In Windows systems, these “paged out” pages are stored in one or more files (Pagefile.sys files) in the root of a partition. There can be one such file in each disk partition. Please refer to Microsoft official website page as below:
https://support.microsoft.com/en-us/help/2160852/ram-virtual-memory-pagefile-and-memory-management-in-windows
2. How to release the capacity from your hard drive?
2-1 Portable HDD:Please process it with normal format.
2-2 System HDD:My Computer(right click)>Properties>Advanced system settings> Advanced(sheet) > Setting > Advanced(sheet) > Virtual Memory(Change…) >Cancel the item「Automatically manage paging file size for all drives」