Recently, my Cuda program encountered a rare problem of memory insufficiency in Mac. After some investigation, we found that Mac memory consumption was amazing. Through cudamemgetinfo In the MAC system, we found that although the total memory of a geforce GT 120 piece is 536 MB, the free memory is only 21 MB. Although the situation on GeForce 9400 is not so surprising, free memory is better than total.
Memory is reduced by 100 MB. In Windows, free memory is about 10 MB less than total memory.
Later, another student told me that the graphic interfaces of many Mac software use the hardware acceleration function of the graphics card, even the basic display function. So I shut down many running programs on Mac equipped with geforce GT 120, and the free memory was much more-170 MB. At this time, I ran my program and there was no error of insufficient memory.
Maybe Mac puts a lot of display logic into the kernel. Otherwise, even if many programs are running in the current system, the free space available in the virtual memory of a process should not be affected, but it is often necessary to exchange between the real and virtual storage, which leads to a serious decline in program performance. It seems that Mac is still intended for individual consumers rather than professional operating systems.