Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment The problem with subsidies... (Score 2) 356

... is that there's so many to choose from. Noam Chomsky even makes a pretty plausivle case that big business in US depends on the government $$$ since, like, forever. Without comparing subsidies and their spread over various industries, this article ranges from stating the obvious to a hit piece .

Comment Too one-sided for my taste (Score 2) 422

That's what you often get when you are tech company and you fire the founder (http://archive09.linux.com/feature/52897). Orat least, that's my bet: marketing and management was blowing money through unproductive attempts to grow the business without enough focus on a viable product in their target market. That said... A quick google shows dozens of articles repeating what the CEO said, which eerily smells like "often repeated lie becomes truth". :-)

Comment Re:Memory Leaks? (Score 1) 531

Virtual memory can't solve fragmentation problems.

Example 1 (running out of memory): you have your OS on 32 bit hardware. That's 4GB of address space. Your program allocates 333MB, then 666MB, does that 4 times. Frees all 4 333MB blocks. That's 1.2GB. Asks for, say 400MB - not possible! Why? Because, in your address space, there's no block that big. You have free blocks at 0 to 333MB, 1000-1333MB etc. Virtual memory suddenly became "physical". Consequence: out of memory when there's memory.

Example 2 (having big process working set although actual heap usage is small): you allocate small(ish) things on the heap. While doing that, your allocator asks for memory from the OS, but only from time to time, as it's expensive and granularity is lower (OS gives out memory "pages"). Imagine that for 100 smallish things you end up with 1 actual hop to the OS. Now, imagine you allocate 1000 things, with 10 hops to the OS (you get 10 pages). Now, you deallocate thing 1 to 99, thing 101 to 199 etc. Although you are using only 10 smallish things, your OS reserves memory for you as if you still have 1000. Only when you free thing 0, you can give your first block (page) back to OS. Consequence: a lot of swapping for little memory used (because OS knows only of it's own blocks (pages), it swaps per these blocks).

Conclusion: depending on memory allocation profile of the program, fragmentation can become a big problem. More so if consumption goes closer to available address space.

Slashdot Top Deals

Adapt. Enjoy. Survive.

Working...