To view parent comment, click here.
To read all comments associated with this story, please click here.
Two points:
o First, an MMU is not a panacea for memory fragmentation. Frequent memory allocations and deallocations of different sizes "randomly" can result in a process's address space resulting in the memory required for the process growing much larger than necessary. Further, much of this memory may not be paged out (depending on page sizes and memory block size), which can have a significant impact on overall memory usage.
o Second, another technique for managing contiguous memory regions is to use the mmap() function (usually implemented as a system call). This can be used both for purely private space (mapping to /dev/zero with the MAP_PRIVATE option) or for large-scale file I/O (rather than reading a large file, for example, it may be mapped into memory and accessed directly). This technique may substantially reduce fragmentation in a process's address space and (for read-only files) eliminate swap space allocation.





Member since:
Man, you are so right. Somebody had better tell every programmer for every CAD package that they don't have to load a 100Mb file. I mean c'mon when I'm working on a large solid model I like it when I have a hard drive hit to slow me down.
Sorry, couldn't resist! :-)
---I can only assume most of the rest is aimed at someone fresh out of computer studies course because only a moron would load a 100Mb file into memory and process it that way unless there was a *very* compelling reason. Its something only a new programmer would do, and I would expect any graduate to know better.