At 4:50 PM -0400 7/12/02, Mike Lambert wrote:
>I'll take a stab at it. Got a few questions, tho:
>
>a) Can I assume the stack always extends into larger-addressed memory, or
>must I handle both cases?

Both cases. If you want to add configure probing to determine 
direction, go ahead.

>b) What's the largest alignment guaranteed for pointers? Byte-level?

I think we can safely assume natural alignment, so you can treat the 
stack as an array of pointers. If the start and end point are both 
pointers you can just iterate that way.

>c) Where should this code go, such that it can be replaced for the
>OS/platforms which need it differently? resources.c? <platform>.c? Maybe
>in resources.c with each <platform>.c calling the generic one in
>resources.c (since win32, generic, darwin, etc are all likely to share the
>same logic.)

Stick it in resources.c, with an #ifndef PLATFORM_STACK_WALK around 
it. Call the function DOD_walk_stack or something, and that way if 
someone needs a special version they can put it in their platform.c

>Dan Sugalski wrote:
>
>>  Date: Fri, 12 Jul 2002 13:05:54 -0400
>>  From: Dan Sugalski <[EMAIL PROTECTED]>
>>  To: [EMAIL PROTECTED]
>>  Subject: Adding the system stack to the GC
>>
>>  Okay, anyone up for this? Should be fairly trivial--take the address
>>  of an auto variable in runops, store it in the interpreter, take the
>>  address of *another* auto variable in the GC, and walk the contiguous
>>  chunk of memory between, looking for valid PMC and Buffer pointers.
>>
>  > Anyone?

-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to