why does apple suck?

darkwing

macrumors 65816
Original poster
Jan 6, 2004
1,210
0
Here's a cool thing to do with Leopard:

1) Open TextEdit
2) Open ActivityMonitor and set filter to "TextEdit"
3) Observe ~6 megs of "real memory" usage. This may seem like a lot to some, but all the Cocoa frameworks are loaded and initialized. If you want a powerful GUI you have to pay some overhead. No complaints there.
4) Create 900 empty new text windows.
5) Observe approx ~780 MB of real memory usage. (Again, this is still ok.)
6) Option-click a close box and watch all windows close.
7) Observe ~49 MB of memory usage.

Tiger had horrible memory leaks in Cocoa. So did Panther. So did Jaguar. How long will this framework be in use before basic memory leaks are fixed?

Also, how does thread creation time (my biggest gripe with OSX) get WORSE with Leopard coming out? (According to xbench results.) Simply put, the people over at Apple are idiots. It's cool that they've made a pretty GUI on top of a UNIX foundation, but they clearly have no interest in making it a platform that anyone with a solid computer science background can be proud of.

</rant>
 

adrianblaine

macrumors 65816
Oct 12, 2006
1,156
0
Pasadena, CA
Every company has flaws. Every human has flaws. We have to deal with it. If it is a big deal to you, find a way to work for them and fix the problem instead of griping about it.
 

tyr2

macrumors 6502a
May 6, 2006
801
83
Leeds, UK
As I understand it one of Apple's design goals with the kernel/OS is to make it appear to be running faster to the end user, rather than improving artificial benchmarks. I've got to say Leopard certainly seems much faster than Tiger especially on my Mac Pro.

Edit: That's regarding the thread creation time, not the memory issue, if that wasn't clear.
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,777
12
Grand Rapids, MI, USA
I have no clue why anyone would open that many text edit windows...
It's a proof of concept. The idea is that, most likely, some failure to de-allocate memory is occurring with each window, but the amount is too small to be easily noticed. When you do it 900 times, you notice the stack up. But the problem was there in the beginning.

Suppose Safari has a similar leak level. Opening 900 blank tabs and closing them would be silly. However, I close / reset Safari maybe once every week or two. Opening and closing 900 tabs between resets is not at all unreasonable for me.
 

BBC B 32k

macrumors 6502
Aug 5, 2005
345
1
London
first time computer users may not realize that you put more than one character in each file. Apple should have this covered. I for one am going back to my Phillips G7000 for my computing needs.
 

cmaier

macrumors P6
Jul 25, 2007
16,078
12,315
California
I wonder if part of the issue is that they are now using garbage collection. Are you seeing the leak if you exit the program, or just when you close the windows? If the latter, the collector might simply not have decided to sweep up yet.
 

ClassicBean

macrumors 6502a
Jun 20, 2004
642
2
Torontoland
Here's a cool thing to do if you have time to open up 900 text edit windows for no apparent reason:

1) Click the apple icon
2) Click Shut Down...
3) Observe the computer shutting down
4) Get dressed
5) Put on some cologne
6) Go get laid
 

D1G1T4L

macrumors 68000
Jun 26, 2007
1,707
80
Savannah, GA
Here's a cool thing to do if you have time to open up 900 text edit windows for no apparent reason:

1) Click the apple icon
2) Click Shut Down...
3) Observe the computer shutting down
4) Get dressed
5) Put on some cologne
6) Go get laid
Shut down? Now why would you want to go and do that :D
 

compuguy1088

macrumors 6502a
Sep 3, 2007
883
14
In the Sub-Basement of Solitude
It's a proof of concept. The idea is that, most likely, some failure to de-allocate memory is occurring with each window, but the amount is too small to be easily noticed. When you do it 900 times, you notice the stack up. But the problem was there in the beginning.

Suppose Safari has a similar leak level. Opening 900 blank tabs and closing them would be silly. However, I close / reset Safari maybe once every week or two. Opening and closing 900 tabs between resets is not at all unreasonable for me.
Isn't that why you have to reboot every once in awhile. Code will never be completely bug free.
 

Slumbercub

macrumors regular
Jul 12, 2006
194
1
Gloucester, England
Here's a cool thing to do if you have time to open up 900 text edit windows for no apparent reason:

1) Click the apple icon
2) Click Shut Down...
3) Observe the computer shutting down
4) Get dressed
5) Put on some cologne
6) Go get laid
LOL :D

I can see no reason for 900 text windows, or any other window for that matter. It is a shame we can't have 900 Spaces! :eek:
 

gr8tfly

macrumors 603
Oct 29, 2006
5,299
50
~119W 34N
Garbage collection is working fine when TextEdit exits. On the surface (using Activity Monitor), it does look like TextEdit itself has a leak. However, it's all deallocated upon exit.

It's quite an extreme leap to condemn an entire engineering group (let along the entire company), because there's something you notice that looks like a problem. It's not rocket science to use Activity Monitor (or other tools) to monitor memory allocation/deallocation. I sincerely doubt you're the first to notice this behavior, especially when it's something so easy check.

edit: There are most likely hundreds of action items for each engineering group. This is most likely one of them, and it's not going to be high on the list. I wouldn't be at all surprised if some groups (if not the majority) are having daily meetings to prioritize them - especially getting the first update for 10.5 out.

If you still think they need to know about the bug, you can signup for a free ADC account and submit a bug report.
 

unity

macrumors 6502a
Sep 30, 2005
926
0
Green Bay, WI
After reading all of this, I am still trying to figure out how this is being called a memory leak. Oh, its not.

This is a rather common "issue", although its not, with ALL OSs. Even OS 9 on back did this.

A memory leak is when a program starts using RAM when not called for and keeps doing so even until there is even no RAM available. Its like overfilling a bath tub.
 

gr8tfly

macrumors 603
Oct 29, 2006
5,299
50
~119W 34N
A memory leak is when a program starts using RAM when not called for and keeps doing so even until there is even no RAM available. Its like overfilling a bath tub.
What you're describing is more akin to a buffer overflow. Usually will end up in a crash.

Leaks happen when which is allocated, but never deallocated. That's what garbage collection takes care of.
 

stupidregister

macrumors member
Sep 29, 2007
52
0
Garbage collection is working fine when TextEdit exits. On the surface (using Activity Monitor), it does look like TextEdit itself has a leak. However, it's all deallocated upon exit.
Of course it is deallocated on exit. Memory deallocation on exit is handled by the operating system. Memory leaks typically refer to unneeded memory that is not deallocated while the program is still running, not when it exits. If the memory stayed allocated even after program exit, that would lead to major problems and the OS would be to blame.
 

J@ffa

macrumors 6502a
Jul 21, 2002
659
32
Behind you!
LOL :D

I can see no reason for 900 text windows, or any other window for that matter. It is a shame we can't have 900 Spaces! :eek:
Methinks you just inadvertently came up with a use for the 32GB of RAM the Mac Pro supports! :D

On a theoretical note, seeing as how this thread isn't really going too far, is it possible to override the maximum number of Spaces you can have anywhere? Or is it hard coded? I'm perfectly happy with four but meh. I'm not creating a new thread just for the purpose of such a silly musing question :p
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.