Index: src/examples/gc_no_raii/src/gcpointers.c
===================================================================
--- src/examples/gc_no_raii/src/gcpointers.c	(revision 61a48757656efe758be315326b5c1d41dc33cd8b)
+++ src/examples/gc_no_raii/src/gcpointers.c	(revision eb38dd571a61ec1b36762c6034a049b956966c51)
@@ -1,101 +1,101 @@
 #include "gcpointers.h"
 
-#include "gc.h"
+// #include "gc.h"
 #include "internal/collector.h"
-//#include "internal/object_header.h"
+// #include "internal/object_header.h"
 // #include "internal/state.h"
-/*
-void register_ptr(gcpointer_t* this)
-{
-	// if(gcpointer_null(this)) return;
-	//
-	// _Bool managed = gc_is_managed(this);
-	//
-	// if(managed)
-	// {
-	// 	gc_object_header* obj = gc_get_object_for_ref(gc_get_state(), (void*)this);
-	// 	check(obj);
-	// 	check(gc_obj_is_valide(obj));
-	// 	check(gc_is_managed(this) == gc_is_managed(obj->type_chain) || obj->type_chain == NULL);
-	// 	this->next = obj->type_chain;
-	// 	obj->type_chain = this;
-	// 	check(obj->is_valide());
-	// }
-	// else
-	// {
-	// 	gc_object_header* obj = gc_get_object_ptr((void*)this->ptr);
-	// 	check(obj);
-	// 	check(gc_obj_is_valide(obj));
-	// 	check(gc_is_managed(this) == gc_is_managed(obj->root_chain) || obj->root_chain == NULL);
-	// 	this->next = obj->root_chain;
-	// 	obj->root_chain = this;
-	// 	check(gc_obj_is_valide(obj));
-	// }
-}
 
-void unregister_ptr(gcpointer_t* this)
-{
-	// if(gcpointer_null(this)) return;
-	//
-	// gcpointer_t** prev_next_ptr = gc_find_previous_ref(this);
-	// check((*prev_next_ptr) == this);
-	//
-	// (*prev_next_ptr) = this->next;
-}
-
-void gcpointer_ctor(gcpointer_t* this)
-{
-	this->ptr = (intptr_t)NULL;
-	this->next = NULL;
-}
-
-void gcpointer_ctor(gcpointer_t* this, void* address)
-{
-	this->ptr = (intptr_t)address;
-	this->next = NULL;
-
-	register_ptr(this);
-}
-
-void gcpointer_ctor(gcpointer_t* this, gcpointer_t* other)
-{
-	this->ptr = other->ptr;
-	this->next = NULL;
-
-	register_ptr(this);
-}
-
-void gcpointer_dtor(gcpointer_t* this)
-{
-	unregister_ptr(this);
-}
-
-gcpointer_t* gcpointer_assign(gcpointer_t* this, gcpointer_t* rhs)
-{
-	if(this != rhs)
-	{
-		unregister_ptr(this);
-
-		this->ptr = rhs->ptr;
-
-		register_ptr(this);
-	}
-
-	return this;
-}
-
-//Logical operators
-int gcpointer_equal(gcpointer_t* this, gcpointer_t* rhs)
-{
-	return this->ptr == rhs->ptr;
-}
-
-int gcpointer_not_equal(gcpointer_t* this, gcpointer_t* rhs)
-{
-	return this->ptr != rhs->ptr;
-}
-
-int gcpointer_null(gcpointer_t* this)
-{
-	return this->ptr == (intptr_t)NULL;
-}*/
+// void register_ptr(gcpointer_t* this)
+// {
+// 	if(gcpointer_null(this)) return;
+//
+// 	_Bool managed = gc_is_managed(this);
+//
+// 	if(managed)
+// 	{
+// 		gc_object_header* obj = gc_get_object_for_ref(gc_get_state(), (void*)this);
+// 		check(obj);
+// 		check(gc_obj_is_valide(obj));
+// 		check(gc_is_managed(this) == gc_is_managed(obj->type_chain) || obj->type_chain == NULL);
+// 		this->next = obj->type_chain;
+// 		obj->type_chain = this;
+// 		check(obj->is_valide());
+// 	}
+// 	else
+// 	{
+// 		gc_object_header* obj = gc_get_object_ptr((void*)this->ptr);
+// 		check(obj);
+// 		check(gc_obj_is_valide(obj));
+// 		check(gc_is_managed(this) == gc_is_managed(obj->root_chain) || obj->root_chain == NULL);
+// 		this->next = obj->root_chain;
+// 		obj->root_chain = this;
+// 		check(gc_obj_is_valide(obj));
+// 	}
+// }
+//
+// void unregister_ptr(gcpointer_t* this)
+// {
+// 	if(gcpointer_null(this)) return;
+//
+// 	gcpointer_t** prev_next_ptr = gc_find_previous_ref(this);
+// 	check((*prev_next_ptr) == this);
+//
+// 	(*prev_next_ptr) = this->next;
+// }
+//
+// void gcpointer_ctor(gcpointer_t* this)
+// {
+// 	this->ptr = (intptr_t)NULL;
+// 	this->next = NULL;
+// }
+//
+// void gcpointer_ctor(gcpointer_t* this, void* address)
+// {
+// 	this->ptr = (intptr_t)address;
+// 	this->next = NULL;
+//
+// 	register_ptr(this);
+// }
+//
+// void gcpointer_ctor(gcpointer_t* this, gcpointer_t* other)
+// {
+// 	this->ptr = other->ptr;
+// 	this->next = NULL;
+//
+// 	register_ptr(this);
+// }
+//
+// void gcpointer_dtor(gcpointer_t* this)
+// {
+// 	unregister_ptr(this);
+// }
+//
+// gcpointer_t* gcpointer_assign(gcpointer_t* this, gcpointer_t* rhs)
+// {
+// 	if(this != rhs)
+// 	{
+// 		unregister_ptr(this);
+//
+// 		this->ptr = rhs->ptr;
+//
+// 		register_ptr(this);
+// 	}
+//
+// 	return this;
+// }
+//
+// //Logical operators
+// int gcpointer_equal(gcpointer_t* this, gcpointer_t* rhs)
+// {
+// 	return this->ptr == rhs->ptr;
+// }
+//
+// int gcpointer_not_equal(gcpointer_t* this, gcpointer_t* rhs)
+// {
+// 	return this->ptr != rhs->ptr;
+// }
+//
+// int gcpointer_null(gcpointer_t* this)
+// {
+// 	return this->ptr == (intptr_t)NULL;
+// }
Index: src/examples/gc_no_raii/src/internal/collector.h
===================================================================
--- src/examples/gc_no_raii/src/internal/collector.h	(revision 61a48757656efe758be315326b5c1d41dc33cd8b)
+++ src/examples/gc_no_raii/src/internal/collector.h	(revision eb38dd571a61ec1b36762c6034a049b956966c51)
@@ -4,45 +4,44 @@
 #include <stdint.h>
 
-#include "tools.h"
+// #include "tools.h"
+//
+// #include "gcpointers.h"
+// #include "internal/gc_tools.h"
+// #include "internal/globals.h"
+// #include "internal/object_header.h"
+// #include "internal/state.h"
+#include "tools/worklist.h"
 
-//#include "gcpointers.h"
-//#include "internal/gc_tools.h"
-//#include "internal/globals.h"
-#include "internal/object_header.h"
-//#include "internal/state.h"
-#include "tools/worklist.h"
-/*
-inline bool gc_is_managed(void* address)
-{
-	return gc_is_in_heap(gc_get_state(), address);
-}
-
-inline gc_object_header* gc_get_object_ptr(void* ptr)
-{
-	void* clean = gc_get_aligned_ptr(ptr);
-	return ((gc_object_header*)clean) - 1;
-}
-
-inline gc_memory_pool* gc_pool_of(void* address)
-{
-	//return (struct gc_memory_pool*)(((intptr_t)address) & POOL_PTR_MASK);
-}
-
-inline void gc_conditional_collect()
-{
-	if(gc_needs_collect(gc_get_state()))
-	{
-		gc_collect(gc_get_state());
-	}
-}
-
-gcpointer_t** gc_find_previous_ref(gcpointer_t* target);
-
-void* gc_allocate(size_t size);
-
-void gc_process_reference(void** ref, worklist_t* worklist);
-
-struct gc_object_header* gc_copy_object(struct gc_object_header* ptr);
-
-void gc_scan_object(struct gc_object_header* object, worklist_t* worklist);
-*/
+// inline bool gc_is_managed(void* address)
+// {
+// 	return gc_is_in_heap(gc_get_state(), address);
+// }
+//
+// inline gc_object_header* gc_get_object_ptr(void* ptr)
+// {
+// 	void* clean = gc_get_aligned_ptr(ptr);
+// 	return ((gc_object_header*)clean) - 1;
+// }
+//
+// inline gc_memory_pool* gc_pool_of(void* address)
+// {
+// 	return (struct gc_memory_pool*)(((intptr_t)address) & POOL_PTR_MASK);
+// }
+//
+// inline void gc_conditional_collect()
+// {
+// 	if(gc_needs_collect(gc_get_state()))
+// 	{
+// 		gc_collect(gc_get_state());
+// 	}
+// }
+//
+// gcpointer_t** gc_find_previous_ref(gcpointer_t* target);
+//
+// void* gc_allocate(size_t size);
+//
+// void gc_process_reference(void** ref, worklist_t* worklist);
+//
+// struct gc_object_header* gc_copy_object(struct gc_object_header* ptr);
+//
+// void gc_scan_object(struct gc_object_header* object, worklist_t* worklist);
Index: src/examples/gc_no_raii/src/tools/worklist.h
===================================================================
--- src/examples/gc_no_raii/src/tools/worklist.h	(revision 61a48757656efe758be315326b5c1d41dc33cd8b)
+++ src/examples/gc_no_raii/src/tools/worklist.h	(revision eb38dd571a61ec1b36762c6034a049b956966c51)
@@ -17,3 +17,3 @@
 */
 
-//typedef vector(intptr_t*) worklist_t;
+typedef vector(intptr_t*, heap_allocator(intptr_t*)) worklist_t;
Index: src/examples/gc_no_raii/src/vector.h
===================================================================
--- src/examples/gc_no_raii/src/vector.h	(revision 61a48757656efe758be315326b5c1d41dc33cd8b)
+++ src/examples/gc_no_raii/src/vector.h	(revision eb38dd571a61ec1b36762c6034a049b956966c51)
@@ -1,17 +1,120 @@
+#include <assert.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
 
+#define DESTROY(x)
 
-context allocator(type T, type all) {
-	T realloc(all*, size_t);
+//------------------------------------------------------------------------------
+//Declaration
+context allocator_c(type T, type allocator_t) {
+	void reallocate(allocator_t*, size_t);
+	T* data(allocator_t*);
 };
 
-forall(type T, type all | allocator(T, all))
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
 struct vector
 {
-	T *m_data;
+	allocator_t storage;
+	size_t size;
 };
 
-// forall(type T, type all)
-// void push_back(vector(T, all)* this, T value)
-// {
-// 	(*(this->m_data)) = value;
-// }
+//------------------------------------------------------------------------------
+//Capacity
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+bool empty(vector(T, allocator_t)* this)
+{
+	return this->size == 0;
+}
+
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+bool size(vector(T, allocator_t)* this)
+{
+	return this->size;
+}
+
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+void reserve(vector(T, allocator_t)* this, size_t size)
+{
+	reallocate(&this->storage, this->size+1);
+}
+
+//------------------------------------------------------------------------------
+//Element access
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+T at(vector(T, allocator_t)* this, size_t index)
+{
+	//assert(index < this->size);
+	return data(&this->storage)[index];
+}
+
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+T ?[?](vector(T, allocator_t)* this, size_t index)
+{
+	return data(&this->storage)[index];
+}
+
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+T front(vector(T, allocator_t)* this)
+{
+	return data(&this->storage)[0];
+}
+
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+T back(vector(T, allocator_t)* this, size_t index)
+{
+	return data(&this->storage)[this->size - 1];
+}
+
+//------------------------------------------------------------------------------
+//Modifiers
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+void push_back(vector(T, allocator_t)* this, T value)
+{
+	reallocate(&this->storage, this->size+1);
+	data(&this->storage)[this->size] = value;
+	this->size++;
+}
+
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+void pop_back(vector(T, allocator_t)* this)
+{
+	this->size--;
+	DESTROY(data(&this->storage)[this->size]);
+}
+
+forall(type T, type allocator_t | allocator_c(T, allocator_t))
+void clear(vector(T, allocator_t)* this)
+{
+	for(size_t i = 0; i < this->size; i++)
+	{
+		DESTROY(data(&this->storage)[this->size]);
+	}
+	this->size = 0;
+}
+
+//------------------------------------------------------------------------------
+//Allocator
+forall(type T)
+struct heap_allocator
+{
+	T* storage;
+	size_t capacity;
+};
+
+forall(type T)
+void reallocate(heap_allocator(T)* this, size_t size)
+{
+	static const size_t GROWTH_RATE = 2;
+	if(size > this->capacity)
+	{
+		this->capacity = GROWTH_RATE * size;
+		this->storage = (T*)realloc((void*)this->storage, this->capacity * sizeof(T));
+	}
+}
+
+forall(type T)
+T* data(heap_allocator(T)* this)
+{
+	return this->storage;
+}
