Subject: Re: anybody familiar with these Mac ROM calls?
To: Rick C. Petty <pett0019@gold.tc.umn.edu>
From: Ken Nakata <kenn@eden.rutgers.edu>
List: port-mac68k
Date: 04/07/1996 11:05:08
> > _NewPtr(SysClear) and _DisposPtr are already supported by MRG.  I
> > figured _HLock isn't a problem since nobody messes around anybody
> > else's memory under NetBSD.
> 
> Yeah, well it may be important.

No, nobody moves anybody else's memory blocks under NetBSD, so
basically any block is always "locked".

> >  _SInt{Install,Remove} wouldn't work
> > anyway, unless we make drastic changes in the interrupt handlers,
> > so I guess it's okay if they are just stubs doing nothing.
> 
> Isn't there some sort of pseudo slot manager in BSD?

Nope.  That's what I'm hoping to write.

> > It seems to me that _ResrvMem could be just a stub routine, too, since
                       ^*emulated* (I left this out... sorry)
> > it doesn't seem to really allocate anything.
> 
> But it moves around memory in preparation...

Under MacOS, okay.  But under NetBSD, since nobody moves any allocated
memory blocks, do you need it?  I think not.

> Basically, handles are pointers to pointers, but those first pointers are 
> located in the master pointer records (see MoreMasters...) and contain 

Yeah, because MacOS moves blocks around?  Which isn't the case for
NetBSD...

> more information than just the pointer itself, like whether it's 
> purged,locked, a resource, etc.

I don't think our *emulated* handles need to contain these bits of
information...

> I don't think BSD uses handles, but I've been wrong before...

A simple double pointer, maybe.

> What I think you should do is not worry about the Handle and just 
> allocate a Ptr, since the block of memory looks to be fixed (locked) the 
> whole time anyway.  Then you won't have to mess with master pointers 
> either.  BTW:  Whatever happened to malloc()?

malloc() is called to emulate NewHandle().

Thanks for the tips.

ken