mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 11:10:25 +02:00
Add conservative stack capture
This isn't really wired up yet anywhere, but add a precursor to conservative stack scanning.
This commit is contained in:
parent
a5b1a66d21
commit
d2bde8319f
10 changed files with 200 additions and 58 deletions
29
gc-stack.h
Normal file
29
gc-stack.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef GC_STACK_H
|
||||
#define GC_STACK_H
|
||||
|
||||
#ifndef GC_IMPL
|
||||
#error internal header file, not part of API
|
||||
#endif
|
||||
|
||||
#include "gc-inline.h"
|
||||
#include <setjmp.h>
|
||||
|
||||
struct gc_stack_addr {
|
||||
uintptr_t addr;
|
||||
};
|
||||
|
||||
struct gc_stack {
|
||||
struct gc_stack_addr cold;
|
||||
struct gc_stack_addr hot;
|
||||
jmp_buf registers;
|
||||
};
|
||||
|
||||
GC_INTERNAL void gc_stack_init(struct gc_stack *stack,
|
||||
struct gc_stack_addr *base);
|
||||
GC_INTERNAL void gc_stack_capture_hot(struct gc_stack *stack);
|
||||
GC_INTERNAL void gc_stack_visit(struct gc_stack *stack,
|
||||
void (*visit)(uintptr_t low, uintptr_t high,
|
||||
void *data),
|
||||
void *data);
|
||||
|
||||
#endif // GC_STACK_H
|
Loading…
Add table
Add a link
Reference in a new issue