Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!ames!oliveb!pyramid!decwrl!Angelo!Portia!Jessica!duggie From: duggie@Jessica.stanford.edu (Doug Felt) Newsgroups: comp.sys.mac.programmer Subject: Re: Object Pascal Summary: objects vs malloc Keywords: Object Pascal, Object C Message-ID: <155@Portia.Stanford.EDU> Date: 30 Jan 89 17:51:12 GMT References: <7096@spool.cs.wisc.edu> <1096@husc6.harvard.edu> Sender: news@Portia.Stanford.EDU Reply-To: duggie@Jessica.stanford.edu (Doug Felt) Organization: Stanford University Lines: 20 Excuse me if I'm wrong, but I seem to remember that early implementations of the standard C libraries used the memory manager rather naively to implement things like malloc, with the result that malloc had rather high overhead both in terms of time and space. Later implementations allocated larger chunks of memory and malloc'ed out of those, and obtained siginificant speed improvements. It seems this would be relevant to the development of object-oriented flavors of C on the Mac, and whether objects should be memory manager handles or malloc'ed out of larger chunks of memory. It may be that message dispatch overhead outweighs the overhead of GetState/HLock/HUnlock, or that objects are so relatively persistent that using the memory manager to allocate new objects via NewHandle is not significant. Has someone investigated this? And speaking of method dispatch... Doug Felt Courseware Authoring Tools Project Stanford University