Closed Bug 68673 Opened 24 years ago Closed 22 years ago

mac memory allocators need rewrite to be carbon-compliant

Categories

(SeaMonkey :: General, defect, P2)

PowerPC
Mac System 9.x
defect

Tracking

(Not tracked)

RESOLVED WONTFIX
mozilla1.0.1

People

(Reporter: Brade, Assigned: ccarlen)

References

Details

(Keywords: helpwanted, qawanted)

Not sure who to assign this to or if there is a bug already covering this 
specific issue.  Somebody should grab it.  Please cc others who should know about 
this bug.

From Simon's message:
... because our classic allocators use some heap zone stuff to subdivide temp mem 
handles into zones, they don't work under Carbon. So the carbon build was 
switched to use MSL allocators, which never go to temp mem. So running carbon on 
9 means you'll eventually run out of memory.

I think we'll have to change the carbon build to use our allocators, but fix the 
to be carbon-compliant. That's doable, but means work.
Keywords: helpwanted, nsmac1
What's the relative performance between our own allocator and MSL's? If theirs
is as fast (or faster) we should just use theirs. I imagine it would be really
simple to tweak its raw memory allocator to go to temp mem after some point.
i think ours would be faster since it's tuned for different sized blocks, and i'm 
pretty sure the MSL allocators aren't.
The problem with MSL's allocators is they don't go to temp mem, so we end up 
running out of memory rather quickly.
Assignee: nobody → sfraser
I'm not saying we use them as-is. We would need to make a slight mod to them to
make them go to temp memory as well. Any memory allocator I've seen always has a
place where it allocates raw blocks from the OS and we could just modify that.
Conrad: we must try to avoid MSL mods; folks have to be able to build with an 
out-of-the-box CodeWarrior.
But don't we build our own whole StdCLibs right now? With most src from CW and
then some of our own mixed in. I'm not suggesting we modify MSL files in place
but do what we do now - have copies of the project in our tree which build
mostly from src in CW.
*sigh*
Target Milestone: --- → mozilla0.9
Wanna try doug lea's allocator? kandrot checked it in to the source tree...
P2
Priority: -- → P2
moving to mozilla1.0
Target Milestone: mozilla0.9 → mozilla1.0
if we stick with a two-product strategy, this bug can go away as it isn't an 
issue on OSX. 
But what if an embedder wants Carbon builds to run under Mac OS 9?
Status: NEW → ASSIGNED
With CW7, we may be able to ditch our own memory allocator. The implementation
that comes with CW7 is based on a Knuth algorithm and uses fixed size allocators
for small blocks. It claims to perform 50% better than the allocators with
previous versions of CW. Its performance, relative to our own allocator, could
be compared pretty easily. Another advantage of their allocator is that the OS
allocation primitives used to allocate pools are factored out into just two
functions in a separate file. We can just provide implementations of those two
functions which, under OS 9, use temp memory and, under OS X, just call
NewPtr/DisposePtr. We don't have to modify CW files at all because of how
they've factored it.
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
To conrad
Assignee: sfraser → ccarlen
Status: ASSIGNED → NEW
Blocks: 150741
Sorry for the spam. Fizzilla CFM build is dead; should this bug go with it?
Keywords: qawanted
Thanks for the reminder Frankie.  Feel free to comment on any more CFM parrots
you find that don't have toe tags :-)  (With apologies to Monty Python) 
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.