mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-18 10:10:23 +02:00
Always add a header onto objects
We're targetting systems that need to be able to inspect the kind of an object, so this information has to be somewhere. If it's out-of-line, we might save memory, but we would lose locality. Concretely in Guile the tag bits are in the object itself.
This commit is contained in:
parent
d8bcbf2d74
commit
cacc28b577
6 changed files with 14 additions and 20 deletions
4
gc-api.h
4
gc-api.h
|
@ -91,4 +91,8 @@ GC_API_ void gc_finish_for_thread(struct mutator *mut);
|
|||
GC_API_ void* gc_call_without_gc(struct mutator *mut, void* (*f)(void*),
|
||||
void *data) GC_NEVER_INLINE;
|
||||
|
||||
struct gc_header {
|
||||
uintptr_t tag;
|
||||
};
|
||||
|
||||
#endif // GC_API_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue