[svn:parrot] r47479 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Jun 8 22:14:59 UTC 2010
Author: bacek
Date: Tue Jun 8 22:14:58 2010
New Revision: 47479
URL: https://trac.parrot.org/parrot/changeset/47479
Log:
Start extracting Variable_Size_Pool into own files.
Added:
branches/gc_massacre/src/gc/variable_size_pool.h
Modified:
branches/gc_massacre/src/gc/gc_private.h
Modified: branches/gc_massacre/src/gc/gc_private.h
==============================================================================
--- branches/gc_massacre/src/gc/gc_private.h Tue Jun 8 21:45:22 2010 (r47478)
+++ branches/gc_massacre/src/gc/gc_private.h Tue Jun 8 22:14:58 2010 (r47479)
@@ -17,6 +17,7 @@
#define PARROT_GC_PRIVATE_H_GUARD
#include "parrot/settings.h"
+#include "variable_size_pool.h"
#if ! DISABLE_GC_DEBUG
/* Set when walking the system stack. Defined in src/gc/system.c */
@@ -169,29 +170,6 @@
} GC_Subsystem;
-typedef struct Memory_Block {
- size_t free;
- size_t size;
- struct Memory_Block *prev;
- struct Memory_Block *next;
- char *start;
- char *top;
-
- /* Amount of freed memory. Used in compact_pool */
- size_t freed;
-} Memory_Block;
-
-typedef struct Variable_Size_Pool {
- Memory_Block *top_block;
- void (*compact)(PARROT_INTERP, struct Memory_Pools *, struct Variable_Size_Pool *);
- size_t minimum_block_size;
- size_t total_allocated; /* total bytes allocated to this pool */
- size_t guaranteed_reclaimable; /* bytes that can definitely be reclaimed*/
- size_t possibly_reclaimable; /* bytes that can possibly be reclaimed
- * (above plus COW-freed bytes) */
- FLOATVAL reclaim_factor; /* minimum percentage we will reclaim */
-} Variable_Size_Pool;
-
typedef struct Fixed_Size_Arena {
size_t used;
size_t total_objects;
Added: branches/gc_massacre/src/gc/variable_size_pool.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/src/gc/variable_size_pool.h Tue Jun 8 22:14:58 2010 (r47479)
@@ -0,0 +1,56 @@
+/*
+Copyright (C) 2001-2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/gc/variable_size_pool.h - implementation of allocator variable size objects.
+E.g. strings.
+
+=head1 DESCRIPTION
+
+*/
+
+#ifndef PARROT_GC_VARIABLE_SIZE_POOL_H_GUARD
+#define PARROT_GC_VARIABLE_SIZE_POOL_H_GUARD
+
+#include "parrot/settings.h"
+
+typedef struct Memory_Block {
+ size_t free;
+ size_t size;
+ struct Memory_Block *prev;
+ struct Memory_Block *next;
+ char *start;
+ char *top;
+
+ /* Amount of freed memory. Used in compact_pool */
+ size_t freed;
+} Memory_Block;
+
+typedef struct Variable_Size_Pool {
+ Memory_Block *top_block;
+ void (*compact)(PARROT_INTERP, struct Memory_Pools *, struct Variable_Size_Pool *);
+ size_t minimum_block_size;
+ size_t total_allocated; /* total bytes allocated to this pool */
+ size_t guaranteed_reclaimable; /* bytes that can definitely be reclaimed*/
+ size_t possibly_reclaimable; /* bytes that can possibly be reclaimed
+ * (above plus COW-freed bytes) */
+ FLOATVAL reclaim_factor; /* minimum percentage we will reclaim */
+} Variable_Size_Pool;
+
+/* HEADERIZER BEGIN: src/gc/variable_size_pool.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: src/gc/variable_size_pool.c */
+
+
+#endif /* PARROT_GC_VARIABLE_SIZE_POOL_H_GUARD */
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
More information about the parrot-commits
mailing list