G
Gabe McArthur
I'm constructing a garbage collector. I have a way of scanning the
stack precisely, but I need to be able to trace back through the stack
via %ebp. I kind of don't want to have to alter the compiler and add
the overhead by adding a pushl %ebp before each void *gc_alloc(/*void
*ebp,*/ size_t), so I was wondering if anyone out there had any not-
too-devilishly-voodoo-y solution to getting the current function's
base pointer. Maybe it's in the C standard, but I can't find it.
I can alter the compiler, to be sure, but I wanted to know if there
was some easier/lazier/more cost-efficient way of doing things.
-Gabe
stack precisely, but I need to be able to trace back through the stack
via %ebp. I kind of don't want to have to alter the compiler and add
the overhead by adding a pushl %ebp before each void *gc_alloc(/*void
*ebp,*/ size_t), so I was wondering if anyone out there had any not-
too-devilishly-voodoo-y solution to getting the current function's
base pointer. Maybe it's in the C standard, but I can't find it.
I can alter the compiler, to be sure, but I wanted to know if there
was some easier/lazier/more cost-efficient way of doing things.
-Gabe