RE: Fragmentation was RE: [GD-General] Compile times
Brought to you by:
vexxed72
From: Mick W. <mi...@ne...> - 2002-12-17 20:20:15
|
> -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of Brian Hook > Sent: Tuesday, December 17, 2002 11:56 AM > To: gam...@li... > Subject: Fragmentation was RE: [GD-General] Compile times > > > > Virtual memory hides a multitude of sins. > > > > Fragmentation being the big one. > > Unfortunately, no it doesn't. Because the problem isn't > fragmentation of physical memory, it's fragmentation of > virtual addresses. > > There's a common misconception that you get 32-bits of > address space on, say, Windows. You don't. You get 31-bits, > since half the address space is reserved for the OS. Out of > this 2GB you have to share between heap, static data, and > code. So realistically speaking, you have a little less than 2GB. > > If you allocate and delete large chunks of memory, > interspersed with small ones, you will fragment that address > space such that you may have enough physical memory for an > operation, but you won't have enough contiguous address space > to allocate it. > Still, your 2GB of address space will hide fragmentation a lot better than the PS2s 32MB of address space. On the PC, it does not matter so much if you loose 100k for fragmentation (or even leaks...) when changing levels. But on the PS2, you are going to notice this very quickly. I've always felt that this area is one of the fundamental differences between PC programmers and Console programmers. Mick. |