1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-27 21:40:34 +02:00

Separate tagging from collector

The collector now has an abstract interface onto the embedder.  The
embedder has to supply some functionality, such as tracing and
forwarding.  This is a pretty big change in terms of lines but it's
supposed to have no functional or performance change.
This commit is contained in:
Andy Wingo 2022-08-12 16:44:38 +02:00
parent cacc28b577
commit fb71c4c363
20 changed files with 452 additions and 306 deletions

View file

@ -4,6 +4,8 @@
#include "assert.h"
#include "quads-types.h"
#include "simple-allocator.h"
#include "simple-gc-embedder.h"
#include "gc.h"
typedef struct Quad {
@ -24,7 +26,7 @@ typedef HANDLE_TO(Quad) QuadHandle;
static Quad* allocate_quad(struct mutator *mut) {
// memset to 0 by the collector.
return allocate(mut, ALLOC_KIND_QUAD, sizeof (Quad));
return gc_allocate_with_kind(mut, ALLOC_KIND_QUAD, sizeof (Quad));
}
/* Get the current time in microseconds */
@ -106,7 +108,7 @@ static size_t tree_size(size_t depth) {
#define MAX_THREAD_COUNT 256
int main(int argc, char *argv[]) {
if (argc != 3) {
if (argc != 4) {
fprintf(stderr, "usage: %s DEPTH MULTIPLIER PARALLELISM\n", argv[0]);
return 1;
}